-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
node-api: convert NewEnv to node_napi_env__::New #57834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node-api: convert NewEnv to node_napi_env__::New #57834
Conversation
Review requested:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #57834 +/- ##
==========================================
- Coverage 90.24% 90.15% -0.09%
==========================================
Files 630 628 -2
Lines 185470 185036 -434
Branches 36375 36234 -141
==========================================
- Hits 167371 166823 -548
- Misses 10993 11164 +171
+ Partials 7106 7049 -57
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
The build fails because VS2022 build for ARM64 hits out of memory issue:
I wonder if it is a known issue and someone is looking at it, or I should see where to add the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hello. Yes, this is a known problem, although it doesn't occur often. We are already setting I have restarted CI for this, so let's see if it succeeds this time. |
Landed in c326200 |
@StefanStojanovic and @lpinca , thank you for helping with the PR completion! |
Convert local
v8impl::NewEnv
function to thenode_napi_env__::New
method.The new method helps creating new Node-API environment by any code that includes the
node_api_internals.h
header file.There are no changes to the function bodies except for moving them to the top of the file.
The
ThrowNodeApiVersionError
had to be moved because the node_napi_env__::New uses it.This change is required for the new C-based Node.js embedding API - PR #54660.
Since the PR #54660 is too big, it was decided in a Node-API meeting to split it up into smaller PRs.
This is the first PR in the series.