mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: BrowserView crash when 'beforeunload' prevented (#37205)
fix: crash when beforeunload prevented
This commit is contained in:
@@ -112,7 +112,6 @@ BrowserWindow::~BrowserWindow() {
|
||||
api_web_contents_->RemoveObserver(this);
|
||||
// Destroy the WebContents.
|
||||
OnCloseContents();
|
||||
api_web_contents_->Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,6 +139,7 @@ void BrowserWindow::WebContentsDestroyed() {
|
||||
|
||||
void BrowserWindow::OnCloseContents() {
|
||||
BaseWindow::ResetBrowserViews();
|
||||
api_web_contents_->Destroy();
|
||||
}
|
||||
|
||||
void BrowserWindow::OnRendererResponsive(content::RenderProcessHost*) {
|
||||
|
||||
Reference in New Issue
Block a user