Repository navigation
Conversation
|
Change is good, can you share some of those crash stack trace, it will give us better context of the issue. Thanks! |
| }); | ||
|
|
||
| it('can correctly convert accelerators to key codes', async () => { | ||
| await w.webContents.executeJavaScript('document.getElementById("input").focus()'); |
There was a problem hiding this comment.
I ran unit test before submitting the code and found that this case failed.
not ok 114 webContents module sendInputEvent(event) can correctly convert accelerators to key codes
expected '' to equal '+ + +'
AssertionError: expected '' to equal '+ + +'
I fixed it while I was at it.
There was a problem hiding this comment.
For other reviewers, notifyUserActivation was meant as a signal to get beforeunload working more context at #23699, seems like this test accidentally got input focused because of the fake user interaction before. I think the current change is good.
|
@cucbin can you try rebasing on the latest main? That should hopefully resolve the build failures now |
278122e to
e1744e4
Compare
|
Release Notes Persisted
|
|
I have automatically backported this PR to "43-x-y", please check out #52697 |
|
I have automatically backported this PR to "44-x-y", please check out #52698 |
|
I have automatically backported this PR to "42-x-y", please check out #52699 |
Description of Change
I encountered several sporadic crash stack traces.
callstack:
And that likely cause is that IsRenderFrameLive() was not checked before sending the IPC.
RenderFrameHost::GetPrimaryMainFrame() can return an RFH object, but it does not guarantee that the RenderFrame in the renderer is already live.
The low risk change: avoid sending user activation notifications unless the primary main frame is live.
Checklist
npm testpassesRelease Notes
Notes: Fixed a potential crash when notifying user activation before the primary main frame was live.