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 30, 2022
1 parent 3f18ac1 commit 2ae57a7
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 2ae57a7

Please sign in to comment.