Commit 8fbace16 authored by Gabriel Schulhof's avatar Gabriel Schulhof Committed by Michael Dawson
Browse files

n-api: cache Symbol.hasInstance

This improves the performance of napi_instanceof() by retrieving
Symbol.hasInstance from the global object once and then storing a
persistent reference to it in the env.

PR-URL: https://github.com/nodejs/node/pull/12246


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarMichael Dawson <michael_dawson@ca.ibm.com>
parent ca8ccb91
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment