Skip to content

N-API: Expose v8::Object::GetIdentityHash #28195

Closed
@argv-minus-one

Description

@argv-minus-one

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 to napi_strict_equals against 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::GetIdentityHash through N-API. This will make it possible to maintain a hash table of JS object references.

Describe alternatives you've considered
See #28164.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.node-apiIssues and PRs related to the Node-API.wontfixIssues that will not be fixed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions