Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlegendecas <legendecas@gmail.com>2019-12-26 18:16:27 +0300
committerGabriel Schulhof <gabriel.schulhof@intel.com>2020-01-08 10:11:37 +0300
commit96eceb75198e53b16e786248a8ca1e7d0d92e209 (patch)
tree530ca467979274c7e3d304b7ed2c364459195b07 /src/node_api.cc
parent95871a1ed70658d14ee6dbfa62c706ddbe28040d (diff)
doc,src: clarify that one napi_env is per-module
PR-URL: https://github.com/nodejs/node/pull/31102 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'src/node_api.cc')
-rw-r--r--src/node_api.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/node_api.cc b/src/node_api.cc
index 5e467dded5b..fad9cf72a97 100644
--- a/src/node_api.cc
+++ b/src/node_api.cc
@@ -471,8 +471,7 @@ void napi_module_register_by_symbol(v8::Local<v8::Object> exports,
return;
}
- // Create a new napi_env for this module or reference one if a pre-existing
- // one is found.
+ // Create a new napi_env for this specific module.
napi_env env = v8impl::NewEnv(context);
napi_value _exports;