node/lib/internal/process
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
..
esm_loader.js lib: add warning on dynamic import es modules 2019-12-06 23:07:56 -05:00
execution.js lib: enforce use of Promise from primordials 2019-12-16 08:40:14 +01:00
per_thread.js lib: use static Number properties from primordials 2019-11-30 13:45:38 +01:00
policy.js lib: flatten access to primordials 2019-11-25 10:28:15 +01:00
promises.js process: refs --unhandled-rejections documentation in warning message 2019-12-16 11:23:47 +01:00
report.js lib: flatten access to primordials 2019-11-25 10:28:15 +01:00
signal.js bootstrap: use different scripts to setup different configurations 2019-12-20 22:10:13 +08:00
task_queues.js benchmark,doc,lib,test: prepare for padding lint rule 2019-11-30 06:28:29 -08:00
warning.js lib: enforce use of Array from primordials 2019-11-27 19:29:01 +01:00
worker_thread_only.js bootstrap: use different scripts to setup different configurations 2019-12-20 22:10:13 +08:00