Skip to content
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

Merged
merged 1 commit into from Sep 17, 2020
Merged

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Sep 15, 2020

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, then OnWindowLeaveFullScreen() would crash because the webContents would be gone. This handles that by moving the event emission beneath the web_contents() logic on macOS.

cc @MarshallOfSound @jkleinsc @zcbenz

Checklist

Release Notes

Notes: Fixed a crash when closing window in an event listener after exiting fullscreen on macOS.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Sep 15, 2020
@deepak1556 deepak1556 changed the title fix: close window when leave fs crash fix: close window when leave fullscreen crash Sep 15, 2020
@codebytere codebytere force-pushed the fix-close-on-leave branch 2 times, most recently from 295e553 to b1d0acf Compare September 15, 2020 19:47
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Sep 16, 2020
@codebytere codebytere force-pushed the fix-close-on-leave branch 2 times, most recently from 2390a94 to d359c0d Compare September 17, 2020 20:58
@release-clerk
Copy link

release-clerk bot commented Sep 17, 2020

Release Notes Persisted

Fixed a crash when closing window in an event listener after exiting fullscreen on macOS.

@codebytere codebytere deleted the fix-close-on-leave branch September 17, 2020 23:40
@trop
Copy link
Contributor

trop bot commented Sep 17, 2020

I was unable to backport this PR to "10-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Sep 17, 2020

I have automatically backported this PR to "11-x-y", please check out #25524

@trop trop bot removed the target/11-x-y label Sep 17, 2020
@trop
Copy link
Contributor

trop bot commented Sep 17, 2020

I was unable to backport this PR to "9-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Sep 23, 2020

@codebytere has manually backported this PR to "10-x-y", please check out #25604

@trop
Copy link
Contributor

trop bot commented Sep 23, 2020

@codebytere has manually backported this PR to "9-x-y", please check out #25605

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mac OS electron crashes on trying to close browser-window in 'leave-full-screen' event handler
2 participants