Commit 86b101cb authored by Gabriel Schulhof's avatar Gabriel Schulhof Committed by Myles Borins
Browse files

n-api: re-use napi_env between modules

Store the `napi_env` on the global object at a private key. This gives
us one `napi_env` per context.

Refs: https://github.com/nodejs/node/issues/14367
Backport-PR-URL: https://github.com/nodejs/node/pull/19447
PR-URL: https://github.com/nodejs/node/pull/14217


Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarTimothy Gu <timothygu99@gmail.com>
parent 06b12734
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