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 Jan 5, 2023
1 parent 0cc72b3 commit 0237744
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 0237744

Please sign in to comment.