Skip to content

Cache the Symbol.hasInstance value #209

Description

@jasongin

For the V8 implementation of napi_instanceof, we look up the value of Symbol.hasInstance, so that we can check if a particular constructor has customized the instanceof behavior.

As an optimization, the Symbol.hasInstance value could be cached (for each napi_env), which will save some extra work of looking it up for each call to napi_instanceof.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions