Commit Graph

1 Commits

Author SHA1 Message Date
Gabriel Schulhof
9926dfebc8
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
PR-URL: https://github.com/nodejs/node/pull/14217
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-07-27 07:55:48 +08:00