process: refactor bootstrap of worker/main thread stdio, fatalException, and script evaluation#25199
Closed
joyeecheung wants to merge 3 commits intonodejs:masterfrom
Closed
process: refactor bootstrap of worker/main thread stdio, fatalException, and script evaluation#25199joyeecheung wants to merge 3 commits intonodejs:masterfrom
joyeecheung wants to merge 3 commits intonodejs:masterfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
process: move eval and exception bootstrap ito process/execution.js
This patch:
tryGetCwd,evalScriptandfatalExceptionfrombootstrap/node.jsintoprocess/execution.jsso thatthey do have to be passed into the worker thread
setup function, instead the worker code can require them
when necessary.
setUncaughtExceptionCaptureCallbackandhasUncaughtExceptionCaptureCallbackalong with the twoglobal state
exceptionHandlerStateandshouldAbortOnUncaughtToggleinfoprocess.execution.jsas 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
setupProcessStdiowhich contains write access tothe process object into
bootstrap/node.jsMessagePort,MessageChannel,ReadableWorkerStdio,and
WritableWorkerStdiointointernal/worker/io.jsinternal/process/worker_thread_onlyfromsetupChildin
internal/worker.js, and move theprocess._fatalExceptionoverwrite into
bootstrap/node.jsfor 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