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
feat: add app render-process-gone event #23560
Conversation
a5532f2
to
746bc11
Compare
746bc11
to
776f024
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.
The test is failing on Linux:
not ok 25 app module BrowserWindow events should emit render-process-gone event when renderer crashes
AssertionError: expected 'abnormal-exit' to equal 'crashed'
at Context.<anonymous> (electron/spec-main/api-app-spec.ts:473:56)
I'm not sure of the root cause, but if it is because of some platform differences we might want to fix/document it.
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.
This attempts to land half of #20006 again which I still have issues with. This code fundamentally depends on grouping webContents that crashed by assuming that crashed webContents will have their events emitted in the same tick. Which is an implementation detail and fundamentally will not stay true forever.
For instance we'll want to land #20818 or something similar eventually and that would break this new API
776f024
to
5cad9c1
Compare
@MarshallOfSound I've removed the grouping. Btw #20818 was done in a way to still allow the grouping. |
5cad9c1
to
09570c5
Compare
@MarshallOfSound do you know why we are getting |
Nope, not super clear to me. You'd have to trace chromium logic to see where it determines that value |
@@ -432,6 +432,25 @@ describe('app module', () => { | |||
expect(webContents).to.equal(w.webContents); | |||
}); | |||
|
|||
it('should emit render-process-gone event when renderer crashes', async function () { |
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.
Use ifit
?
09570c5
to
3221e9c
Compare
@zcbenz the tests are all green now, can you please unblock? |
Release Notes Persisted
|
/trop run backport-to 8-x-y |
The backport process for this PR has been manually initiated - |
I have automatically backported this PR to "8-x-y", please check out #24314 |
/trop run backport-to 9-x-y |
The backport process for this PR has been manually initiated - |
I have automatically backported this PR to "9-x-y", please check out #24315 |
Description of Change
Follow up to #23096.
Checklist
npm test
passesRelease Notes
Notes: Added new
render-process-gone
event onapp
to replace therenderer-process-crashed
event.