mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: destroy MessageDispatcher before WebContents (#28286)
This commit is contained in:
@@ -914,6 +914,7 @@ WebContents::~WebContents() {
|
||||
return;
|
||||
}
|
||||
|
||||
inspectable_web_contents_->GetView()->SetDelegate(nullptr);
|
||||
if (guest_delegate_)
|
||||
guest_delegate_->WillDestroy();
|
||||
|
||||
@@ -1760,6 +1761,7 @@ void WebContents::DevToolsOpened() {
|
||||
v8::Locker locker(isolate);
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
DCHECK(inspectable_web_contents_);
|
||||
DCHECK(inspectable_web_contents_->GetDevToolsWebContents());
|
||||
auto handle = FromOrCreate(
|
||||
isolate, inspectable_web_contents_->GetDevToolsWebContents());
|
||||
devtools_web_contents_.Reset(isolate, handle.ToV8());
|
||||
|
||||
Reference in New Issue
Block a user