summaryrefslogtreecommitdiff
path: root/src/node_api.cc
diff options
context:
space:
mode:
authorGabriel Schulhof <gabriel.schulhof@intel.com>2017-08-18 13:30:05 +0300
committerMichael Dawson <mdawson@devrus.com>2017-09-19 19:06:44 -0400
commita8c0a43a220298a7c4a7888559a47e0a6235ce74 (patch)
tree6a70b71ccc6114e3e91ff25818a9ea93d5890d9d /src/node_api.cc
parentfaaefa8082033809246d004a9c46b0a612c3bb99 (diff)
downloadandroid-node-v8-a8c0a43a220298a7c4a7888559a47e0a6235ce74.tar.gz
android-node-v8-a8c0a43a220298a7c4a7888559a47e0a6235ce74.tar.bz2
android-node-v8-a8c0a43a220298a7c4a7888559a47e0a6235ce74.zip
n-api: remove n-api module loading flag
Remove the command line flag that was needed for N-API module loading. Re: https://github.com/nodejs/vm/issues/9 PR-URL: https://github.com/nodejs/node/pull/14902 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Hitesh Kanwathirtha <digitalinfinity@gmail.com>
Diffstat (limited to 'src/node_api.cc')
-rw-r--r--src/node_api.cc20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/node_api.cc b/src/node_api.cc
index cedf5ad7a4..8f8c400cdf 100644
--- a/src/node_api.cc
+++ b/src/node_api.cc
@@ -841,28 +841,10 @@ void napi_module_register_cb(v8::Local<v8::Object> exports,
} // end of anonymous namespace
-#ifndef EXTERNAL_NAPI
-namespace node {
- // Indicates whether NAPI was enabled/disabled via the node command-line.
- extern bool load_napi_modules;
-}
-#endif // EXTERNAL_NAPI
-
// Registers a NAPI module.
void napi_module_register(napi_module* mod) {
- // NAPI modules always work with the current node version.
- int module_version = NODE_MODULE_VERSION;
-
-#ifndef EXTERNAL_NAPI
- if (!node::load_napi_modules) {
- // NAPI is disabled, so set the module version to -1 to cause the module
- // to be unloaded.
- module_version = -1;
- }
-#endif // EXTERNAL_NAPI
-
node::node_module* nm = new node::node_module {
- module_version,
+ -1,
mod->nm_flags,
nullptr,
mod->nm_filename,