process: refactor bootstrap of worker/main thread stdio, fatalException, and script evaluation
process: move eval and exception bootstrap ito process/execution.js
This patch:
- Moves
tryGetCwd
,evalScript
andfatalException
frombootstrap/node.js
intoprocess/execution.js
so that they do have to be passed into the worker thread setup function, instead the worker code can require them when necessary. - Moves
setUncaughtExceptionCaptureCallback
andhasUncaughtExceptionCaptureCallback
along with the two global stateexceptionHandlerState
andshouldAbortOnUncaughtToggle
infoprocess.execution.js
as those are only used by the fatalException and these two accessors as one self-contained unit.
process: split worker IO into internal/worker/io.js
- Move
setupProcessStdio
which contains write access to the process object intobootstrap/node.js
- Move
MessagePort
,MessageChannel
,ReadableWorkerStdio
, andWritableWorkerStdio
intointernal/worker/io.js
- Move more worker-specific bootstrap code into
internal/process/worker_thread_only
fromsetupChild
ininternal/worker.js
, and move theprocess._fatalException
overwrite intobootstrap/node.js
for clarity.
process: move worker bootstrap code into worker_thread_only.js
Move worker bootstrap code into worker_thread_only.js from internal/worker.js since they are only run once during bootstrap.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines