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 <[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]>
  • Loading branch information
daeyeon authored and danielleadams committed Jan 3, 2023
1 parent f7c1015 commit 6297e77
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/internal/bootstrap/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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', {
Expand Down Expand Up @@ -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();
}
};

Expand Down

0 comments on commit 6297e77

Please sign in to comment.