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
|
@ -126,6 +126,9 @@ BrowserView::~BrowserView() {
|
|||
}
|
||||
|
||||
void BrowserView::WebContentsDestroyed() {
|
||||
if (owner_window())
|
||||
owner_window()->window()->RemoveDraggableRegionProvider(this);
|
||||
|
||||
api_web_contents_ = nullptr;
|
||||
web_contents_.Reset();
|
||||
Unpin();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue