Skip to content

Commit

Permalink
lib: disambiguate native module to binding
Browse files Browse the repository at this point in the history
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
PR-URL: #45673
Refs: #44135
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
  • Loading branch information
daeyeon authored and danielleadams committed Dec 29, 2022
1 parent 126685d commit 0bb8cc9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/internal/bootstrap/node.js
Expand Up @@ -162,9 +162,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', {
Expand Down Expand Up @@ -310,7 +313,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();
}
};

Expand Down

0 comments on commit 0bb8cc9

Please sign in to comment.