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

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
trop[bot]
2023-07-10 13:42:21 +02:00
committed by GitHub
parent 96b2422f95
commit 13d224e816
4 changed files with 83 additions and 1 deletions

View File

@@ -1313,7 +1313,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) {