Skip to content

Cache the Symbol.hasInstance value #209

@jasongin

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.

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