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: prevent crash if BrowserView webContents was destroyed #25112

Merged
merged 3 commits into from Aug 26, 2020

Conversation

codebytere
Copy link
Member

Description of Change

Fixes an issue where interacting with a BrowserWindow which had a BrowserView attached whose webContents had been destroyed could cause a crash in BaseWindow::ResetBrowserViews().

cc @nornagon @MarshallOfSound

Checklist

Release Notes

Notes: none.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Aug 24, 2020
@codebytere codebytere changed the title fix: prevent crash if BrowserView webContents was destroyed [wip] fix: prevent crash if BrowserView webContents was destroyed Aug 25, 2020
@codebytere codebytere changed the title [wip] fix: prevent crash if BrowserView webContents was destroyed fix: prevent crash if BrowserView webContents was destroyed Aug 25, 2020
@codebytere codebytere changed the title fix: prevent crash if BrowserView webContents was destroyed [wip] fix: prevent crash if BrowserView webContents was destroyed Aug 25, 2020
@codebytere codebytere force-pushed the prevent-bw-crash branch 2 times, most recently from 5d6c132 to dda792a Compare August 25, 2020 05:23
@codebytere codebytere changed the title [wip] fix: prevent crash if BrowserView webContents was destroyed fix: prevent crash if BrowserView webContents was destroyed Aug 25, 2020
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Aug 25, 2020
@codebytere codebytere merged commit c8a0b2b into master Aug 26, 2020
@release-clerk
Copy link

release-clerk bot commented Aug 26, 2020

No Release Notes

@codebytere codebytere deleted the prevent-bw-crash branch August 26, 2020 03:04
@trop
Copy link
Contributor

trop bot commented Aug 26, 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 Aug 26, 2020

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

@trop trop bot removed the target/9-x-y label Aug 26, 2020
@trop
Copy link
Contributor

trop bot commented Aug 26, 2020

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

@trop
Copy link
Contributor

trop bot commented Aug 26, 2020

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

@vladimiry
Copy link

@codebytere

This is NOT A BREAKING CHANGE. Breaking changes may not be merged to master until 11-x-y is branched.

The change looks like a breaking change for me since some public methods got removed.

How do I explicitly destroy the BrowserView instance in v11? Does the linked BrowserView isntance get automatically destroyed when I call browserWindow.setBrowserView(null)?

@codebytere
Copy link
Member Author

codebytere commented Aug 28, 2020

@vladimiry this PR didn't remove the methods - it just addressed documentation as a follow-up on another PR which did so. However, we do agree with you - the PR which did remove these methods did not align with above stated goals as you point out and the methods will be restored.

@vladimiry
Copy link

this PR didn't remove the methods - it just addressed documentation as a follow-up on another PR which did so

Thanks for clarification, I missed looking into that another PR.

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.

None yet

4 participants