Skip to content

src: bootstrap internals loaders before bootstrapping Node.js

  • Moves the creation of process.binding(), process._linkedBinding() internalBinding() and NativeModule into a separate file lib/internal/bootstrap_loaders.js, and documents them there. This file will be compiled and run before bootstrap_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 as internal/bootstrap_loaders since it is setup there. Also put internalBinding in the object exported by NativeModule.require instead of putting it inside the NativeModule.wrapper
  • Names the bootstrapping functions so their names show up in the stack trace.
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

process, modules

Merge request reports

Loading