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: close window when leave fullscreen crash #25468
Conversation
295e553
to
b1d0acf
Compare
2390a94
to
d359c0d
Compare
d359c0d
to
ef3282e
Compare
Release Notes Persisted
|
I was unable to backport this PR to "10-x-y" cleanly; |
I have automatically backported this PR to "11-x-y", please check out #25524 |
I was unable to backport this PR to "9-x-y" cleanly; |
@codebytere has manually backported this PR to "10-x-y", please check out #25604 |
@codebytere has manually backported this PR to "9-x-y", please check out #25605 |
Description of Change
Closes #25422.
Previously we emitted the event before calling
web_contents()
, which meant if an event callback destroyed or closed a window, thenOnWindowLeaveFullScreen()
would crash because thewebContents
would be gone. This handles that by moving the event emission beneath theweb_contents()
logic on macOS.cc @MarshallOfSound @jkleinsc @zcbenz
Checklist
npm test
passesRelease Notes
Notes: Fixed a crash when closing window in an event listener after exiting fullscreen on macOS.