-
-
Notifications
You must be signed in to change notification settings - Fork 37.5k
N-API: Expose v8::Object::GetIdentityHash #28195
Copy link
Copy link
Closed
Labels
feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.node-apiIssues and PRs related to Node-API.Issues and PRs related to Node-API.wontfixIssues that will not be fixed.Issues that will not be fixed.
Description
Activity
Metadata
Metadata
Assignees
Labels
feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.node-apiIssues and PRs related to Node-API.Issues and PRs related to Node-API.wontfixIssues that will not be fixed.Issues that will not be fixed.
Is your feature request related to a problem? Please describe.
A solution suggested for #28164 was to keep a big table of JS objects and their types, and use that to verify the type of a wrapper object before
napi_unwrapping it. Currently, the only way to do this is tonapi_strict_equalsagainst every single object reference in the table, which is very slow if there are a lot of objects to keep track of.Describe the solution you'd like
Please expose
v8::Object::GetIdentityHashthrough N-API. This will make it possible to maintain a hash table of JS object references.Describe alternatives you've considered
See #28164.