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: delay emitting screen events by a tick to avoid re-entrancy crash #19016
Conversation
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.
Can we solve this by not running JS directly in the OnDisplay*
callbacks, but instead posting a task to run the JS after the message has completed processing?
patches/chromium/fix_modify_notifydisplayschanged_to_copy_vectors_on_call.patch
Outdated
Show resolved
Hide resolved
patches/chromium/fix_modify_notifydisplayschanged_to_copy_vectors_on_call.patch
Outdated
Show resolved
Hide resolved
@nornagon I tried that locally but it didn't consistently fix it, this did. I also think we can't guarantee that our code is the only thing that could trigger a re-entry. We should ensure this method can handle re-entry no matter what causes it, |
6a92d78
to
a0f3b09
Compare
a0f3b09
to
cd46ab6
Compare
cd46ab6
to
817a981
Compare
817a981
to
e703778
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.
LGTM, with some style comments
e703778
to
f9be919
Compare
Release Notes Persisted
|
I have automatically backported this PR to "6-0-x", please check out #19022 |
I have automatically backported this PR to "5-0-x", please check out #19023 |
I have automatically backported this PR to "4-2-x", please check out #19024 |
If user code created / destroyed windows inside a screen event handler it could cause re-entrancy on the
WndProc
handler for screen related events causing memory corruption. If we delay the events going to user we won't re-entry and everything will be fine.Notes: Fixed crash when creating certain types of windows in the
display-*
events