fix: webview crash when removing in close event (#38996)

This commit is contained in:
Shelley Vohr
2023-07-06 10:20:34 +02:00
committed by GitHub
parent 5a77c75753
commit c7a64ab994
4 changed files with 83 additions and 1 deletions

View File

@@ -1297,7 +1297,9 @@ void WebContents::CloseContents(content::WebContents* source) {
for (ExtendedWebContentsObserver& observer : observers_)
observer.OnCloseContents();
Destroy();
// This is handled by the embedder frame.
if (!IsGuest())
Destroy();
}
void WebContents::ActivateContents(content::WebContents* source) {