summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaeyeon Jeong <daeyeon.dev@gmail.com>2022-11-29 20:22:49 +0900
committerDanielle Adams <adamzdanielle@gmail.com>2023-01-04 20:31:53 -0500
commit0237744cb8eae4f111830ce6ac68b6574b84f327 (patch)
tree73dc0ef6bfb4acd4b646cdb043531b9763897f14
parent0cc72b30971f04a9ea15ffdfab54c1dde52cc4af (diff)
downloadnode-new-0237744cb8eae4f111830ce6ac68b6574b84f327.tar.gz
lib: disambiguate `native module` to `binding`
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: https://github.com/nodejs/node/pull/45673 Refs: https://github.com/nodejs/node/pull/44135 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
-rw-r--r--lib/internal/bootstrap/node.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js
index 108b11a2f9..f31bc15f2a 100644
--- a/lib/internal/bootstrap/node.js
+++ b/lib/internal/bootstrap/node.js
@@ -104,9 +104,6 @@ process.domain = null;
}
process._exiting = false;
-// process.config is serialized config.gypi
-const nativeModule = internalBinding('builtins');
-
// TODO(@jasnell): Once this has gone through one full major
// release cycle, remove the Proxy and setter and update the
// getter to either return a read-only object or always return
@@ -162,9 +159,12 @@ const deprecationHandler = {
}
};
+// process.config is serialized config.gypi
+const binding = internalBinding('builtins');
+
// eslint-disable-next-line node-core/prefer-primordials
let processConfig = new Proxy(
- JSONParse(nativeModule.config),
+ JSONParse(binding.config),
deprecationHandler);
ObjectDefineProperty(process, 'config', {
@@ -310,7 +310,7 @@ const features = {
// This needs to be dynamic because --no-node-snapshot disables the
// code cache even if the binary is built with embedded code cache.
get cached_builtins() {
- return nativeModule.hasCachedBuiltins();
+ return binding.hasCachedBuiltins();
}
};