-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
process: delay setup of global exception handlers #26061
Conversation
Since bootstrap/node.js performs the setup synchronously, the process exception handlers do not have to setup so early in the bootstrap process - any fatal errors thrown before user code execution should simply crash the process, and we do not care about any clean up at that point. We don't care about emitting any events if the process crash upon bootstrap either.
eed5e09
to
0c98f19
Compare
process.hasUncaughtExceptionCaptureCallback = | ||
hasUncaughtExceptionCaptureCallback; | ||
} | ||
|
||
// User-facing NODE_V8_COVERAGE environment variable that writes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The higher-order bit is that everything below this point (plus setupTraceCategoryState()
and process.argv[0]
setup above) is environment-dependent and should be moved out of node.js - then it would be possible to snapshot Node.js after the execution of this script, which would be dedicated to setting up the process object and global proxy synchronously in an environment-independent manner.
Landed in 0eb71d4 |
Since bootstrap/node.js performs the setup synchronously, the process exception handlers do not have to setup so early in the bootstrap process - any fatal errors thrown before user code execution should simply crash the process, and we do not care about any clean up at that point. We don't care about emitting any events if the process crash upon bootstrap either. PR-URL: #26061 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Gus Caplan <me@gus.host>
Since bootstrap/node.js performs the setup synchronously, the process exception handlers do not have to setup so early in the bootstrap process - any fatal errors thrown before user code execution should simply crash the process, and we do not care about any clean up at that point. We don't care about emitting any events if the process crash upon bootstrap either. PR-URL: #26061 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Gus Caplan <me@gus.host>
Since bootstrap/node.js performs the setup synchronously, the process exception handlers do not have to setup so early in the bootstrap process - any fatal errors thrown before user code execution should simply crash the process, and we do not care about any clean up at that point. We don't care about emitting any events if the process crash upon bootstrap either. PR-URL: #26061 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Gus Caplan <me@gus.host>
Since bootstrap/node.js performs the setup synchronously,
the process exception handlers do not have to setup so early in
the bootstrap process - any fatal errors thrown before user code
execution should simply crash the process, and we do not care
about any clean up at that point. We don't care about emitting any
events if the process crash upon bootstrap either.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes