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.
For the V8 implementation of
napi_instanceof, we look up the value ofSymbol.hasInstance, so that we can check if a particular constructor has customized theinstanceofbehavior.As an optimization, the
Symbol.hasInstancevalue could be cached (for eachnapi_env), which will save some extra work of looking it up for each call tonapi_instanceof.