Skip to content

Commit 0bb8cc9

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 126685d commit 0bb8cc9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/internal/bootstrap/node.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,12 @@ const deprecationHandler = {
162162
}
163163
};
164164

165+
// process.config is serialized config.gypi
166+
const binding = internalBinding('builtins');
167+
165168
// eslint-disable-next-line node-core/prefer-primordials
166169
let processConfig = new Proxy(
167-
JSONParse(nativeModule.config),
170+
JSONParse(binding.config),
168171
deprecationHandler);
169172

170173
ObjectDefineProperty(process, 'config', {
@@ -310,7 +313,7 @@ const features = {
310313
// This needs to be dynamic because --no-node-snapshot disables the
311314
// code cache even if the binary is built with embedded code cache.
312315
get cached_builtins() {
313-
return nativeModule.hasCachedBuiltins();
316+
return binding.hasCachedBuiltins();
314317
}
315318
};
316319

0 commit comments

Comments
 (0)