Skip to content

Commit 0237744

Browse files
daeyeondanielleadams
authored andcommitted
lib: disambiguate native module to binding
Signed-off-by: Daeyeon Jeong <[email protected]> PR-URL: #45673 Refs: #44135 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
1 parent 0cc72b3 commit 0237744

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/internal/bootstrap/node.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,6 @@ process.domain = null;
104104
}
105105
process._exiting = false;
106106

107-
// process.config is serialized config.gypi
108-
const nativeModule = internalBinding('builtins');
109-
110107
// TODO(@jasnell): Once this has gone through one full major
111108
// release cycle, remove the Proxy and setter and update the
112109
// getter to either return a read-only object or always return
@@ -162,9 +159,12 @@ const deprecationHandler = {
162159
}
163160
};
164161

162+
// process.config is serialized config.gypi
163+
const binding = internalBinding('builtins');
164+
165165
// eslint-disable-next-line node-core/prefer-primordials
166166
let processConfig = new Proxy(
167-
JSONParse(nativeModule.config),
167+
JSONParse(binding.config),
168168
deprecationHandler);
169169

170170
ObjectDefineProperty(process, 'config', {
@@ -310,7 +310,7 @@ const features = {
310310
// This needs to be dynamic because --no-node-snapshot disables the
311311
// code cache even if the binary is built with embedded code cache.
312312
get cached_builtins() {
313-
return nativeModule.hasCachedBuiltins();
313+
return binding.hasCachedBuiltins();
314314
}
315315
};
316316

0 commit comments

Comments
 (0)