Unverified Commit c63d511c authored by Joyee Cheung's avatar Joyee Cheung
Browse files

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: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarChengzhong Wu <legendecas@gmail.com>
parent 277f3436
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment