-
Notifications
You must be signed in to change notification settings - Fork 465
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
Add wrappers for node_api_nogc_env
and node_api_nogc_finalize
#1508
Comments
Currently, the four nogc methods call |
Also struggling a bit with figuring out how to make |
Discussed in 24 May Node-API meeting:
|
Another issue that i'm struggling with regarding Lines 4438 to 4450 in 7c79c33
Lines 3265 to 3275 in 7c79c33
Thoughts on how to proceed in this use case...? Does this |
Additionally, in ObjectWrap construction, the Line 4431 in 7c79c33
Not sure how to proceed on this either. Lines 4878 to 4886 in 7c79c33
|
So continuing to dig a bit, mostly keeping this as notes... The combination of the destructor
So, there are two scenarios we need to cover:
|
Seems like this is an exploit of the behavior of |
From my understanding, this is intended behavior...? Since the function takes a Hopefully we can discuss this in today's meeting. |
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made. |
Since nodejs/node#50060 is now in core, we need to add support for these types.
Looking at the Node-API docs, we can find which node-addon-api methods on
Napi::Env
should be split between normal andnogc
variants. The normal variant can use nogc methods, but not the other way around:AddCleanupHook
GetInstanceData
SetInstanceData
GetModuleFileName
Global
Undefined
Null
IsExceptionPending
GetAndClearPendingException
RunScript
Additionally, all JavaScript-using paradigms (creating new Values, calling functions, ...) should use the normal variant, and have a compile-time error if a nogc variant is supplied.
The text was updated successfully, but these errors were encountered: