src: bootstrap internals loaders before bootstrapping Node.js
- Moves the creation of
process.binding()
,process._linkedBinding()
internalBinding()
andNativeModule
into a separate filelib/internal/bootstrap_loaders.js
, and documents them there. This file will be compiled and run beforebootstrap_node.js
, which means we now bootstrap the internal module & binding system before actually bootstrapping Node.js. - Rename the special ID that can be used to require
NativeModule
asinternal/bootstrap_loaders
since it is setup there. Also putinternalBinding
in the object exported byNativeModule.require
instead of putting it inside theNativeModule.wrapper
- Names the bootstrapping functions so their names show up in the stack trace.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines
Affected core subsystem(s)
process, modules