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
fix: renderer crash on setImmediate #26365
Conversation
7a64f7a
to
f02538c
Compare
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.
I know we talked about this on Slack, but I think crash-cases
won't work for us here. crash-cases
detect if the main process crashes, because this crash is in the renderer we'll need a different system 🤔
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.
nvm I see what you're doing now 👍
spec-main/fixtures/crash-cases/setimmediate-renderer-crash/index.js
Outdated
Show resolved
Hide resolved
…ex.js Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Release Notes Persisted
|
I was unable to backport this PR to "10-x-y" cleanly; |
I was unable to backport this PR to "9-x-y" cleanly; |
I have automatically backported this PR to "11-x-y", please check out #26424 |
@codebytere has manually backported this PR to "10-x-y", please check out #26747 |
@codebytere has manually backported this PR to "9-x-y", please check out #26748 |
Description of Change
Closes #26055.
Fixes an issue whereby a corrupted
async_hooks
stack would crash the renderer when throwing some errors in the renderer process. This happened because Node.js resets the async hook stack when exceptions are thrown inside their uncaught exception handler, and in the renderer process we were using Blink's which did not do this. This is fixed by adding our own uncaught message listener to the renderer isolate - this resets the async hook stack to mitigate the crash and better align with Node.js' behavior. Isolate message listeners are additive (you can add multiple) so this does not interfere with Blink's own handling.cc @ckerr @MarshallOfSound
Checklist
npm test
passesRelease Notes
Notes: Fixes an issue whereby a corrupted
async_hooks
stack would crash the renderer when throwing some errors in the renderer process.