Skip to content

fix: prevent crash if BrowserView webContents was destroyed - #25112

Merged
codebytere merged 3 commits into
masterfrom
prevent-bw-crash
Aug 26, 2020
Merged

codebytere merged 3 commits into
masterfrom
prevent-bw-crash

Conversation

@codebytere

Copy link
Copy Markdown
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 recently 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
Comment thread docs/api/browser-view.md Resolved
@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Aug 25, 2020
@codebytere
codebytere merged commit c8a0b2b into master Aug 26, 2020
@release-clerk

release-clerk Bot commented Aug 26, 2020 •

Copy link
Copy Markdown

No Release Notes

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

trop Bot commented Aug 26, 2020

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Aug 26, 2020

Copy link
Copy Markdown
Contributor

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

trop Bot commented Aug 26, 2020

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Aug 26, 2020

Copy link
Copy Markdown
Contributor

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

@vladimiry

Copy link
Copy Markdown

@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

codebytere commented Aug 28, 2020 •

Copy link
Copy Markdown
Member Author

@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
Copy Markdown

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.

4 participants