-
Notifications
You must be signed in to change notification settings - Fork 34
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
Retrieve the finalizer for an object #311
Comments
In the cases where we might consider adding an API to retrieve the finalizer, if we consider that almost always the native module is fronted by a JS module then that IMO weakens the case for such an API addition, because the native module and the JS module fronting the native module are part of the same package, and therefore under the control of a common entity. Yet such a mechanism would provide a fail-safe type check. |
@gabrielschulhof do you think we still need to keep this open? It's been a few years and we've not had any external requests for it. |
With type tagging this is less necessary and we've not implemented in a number of years so we agreed to close in the Node-api team meeting today. Please let us know if that was not the right thing to do. |
Re: nodejs/node#14256
Such type-checking can also be accomplished by having the wrapped objects be instances of certain JS classes, and then using
napi_instanceof()
to decide if a givennapi_value
containing a JavaScript object has the kind of pointer that is expected.Are there any other use cases where knowing the identity of the finalizer is helpful?
The text was updated successfully, but these errors were encountered: