0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib/internal/bootstrap
Joyee Cheung c63d511c13
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.

PR-URL: https://github.com/nodejs/node/pull/30862
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2019-12-20 22:10:13 +08:00
..
switches bootstrap: use different scripts to setup different configurations 2019-12-20 22:10:13 +08:00
environment.js process: run RunBootstrapping in CreateEnvironment 2019-04-03 08:46:03 +08:00
loaders.js lib: refactor NativeModule 2019-12-13 20:53:29 -05:00
node.js bootstrap: use different scripts to setup different configurations 2019-12-20 22:10:13 +08:00
pre_execution.js bootstrap: use different scripts to setup different configurations 2019-12-20 22:10:13 +08:00