8000 fix: crash on browserView.webContents.destroy() by codebytere · Pull Request #31794 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: crash on browserView.webContents.destroy() #31794

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

Merged
merged 1 commit into from
Nov 15, 2021
Merged

Conversation

codebytere
Copy link
Member
@codebytere codebytere commented Nov 11, 2021

Description of Change

Fixes an issue where BrowserViews crashed if view.webContents.destroy() is called after loading a URL. This happened because when the webContents closed synchronously, the InspectableWebContents was forced to close before all observers had been notified, causing a CHECK here.

To fix this, I chose to remove the BrowserView type from the synchronous conditions, though if there is a preferred approach I'm happy to modify this.

Checklist

Release Notes

Notes: Fixes an issue where BrowserViews crashed if view.webContents.destroy() is called after loading a URL.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/14-x-y labels Nov 11, 2021
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Nov 11, 2021
Copy link
Member
@ckerr ckerr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change makes sense to me but I'd like a third opinion too; this feels like I might be missing some nuance.

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Nov 12, 2021
8000 Copy link
Member
@VerteDinde VerteDinde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach makes sense to me 👍

@codebytere codebytere merged commit 7e328c4 into main Nov 15, 2021
@codebytere codebytere deleted the fix-bv-destroy-crash branch November 15, 2021 07:24
@release-clerk
Copy link
release-clerk bot commented Nov 15, 2021

Release Notes Persisted

Fixes an issue where BrowserViews crashed if view.webContents.destroy() is called after loading a URL.

@trop
Copy link
Contributor
trop bot commented Nov 15, 2021

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

@trop
Copy link
Contributor
trop bot commented Nov 15, 2021

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

@trop
Copy link
Contributor
trop bot commented Nov 15, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0