fix: handle closing webContents
in BrowserView
s (#37420)
* fix: handle closing webContents in BrowserViews * test: add window.close() test
This commit is contained in:
parent
8fb0f43030
commit
5e25d23794
4 changed files with 28 additions and 5 deletions
|
@ -1223,9 +1223,7 @@ void WebContents::CloseContents(content::WebContents* source) {
|
|||
for (ExtendedWebContentsObserver& observer : observers_)
|
||||
observer.OnCloseContents();
|
||||
|
||||
// If there are observers, OnCloseContents will call Destroy()
|
||||
if (observers_.empty())
|
||||
Destroy();
|
||||
Destroy();
|
||||
}
|
||||
|
||||
void WebContents::ActivateContents(content::WebContents* source) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue