bootstrap: use different scripts to setup different configurations
bootstrap: use different scripts to setup different configurations
This patch splits the handling of isMainThread
and
ownsProcessState
from conditionals in
lib/internal/bootstrap/node.js
into different scripts under
lib/internal/bootstrap/switches/
, and call them accordingly
from C++ after node.js
is run.
This:
- Creates a common denominator of the main thread and the worker thread bootstrap that can be snapshotted and shared by both.
- Makes it possible to override the configurations on-the-fly.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines