mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
DevToolsFrontendHost::Create to return unique_ptr instead of raw pointer
https://chromium-review.googlesource.com/c/chromium/src/+/1396614
This commit is contained in:
committed by
Samuel Attard
parent
28c7b5f0ab
commit
0459dc7d6f
@@ -732,10 +732,10 @@ void InspectableWebContentsImpl::RenderFrameHostChanged(
|
||||
content::RenderFrameHost* new_host) {
|
||||
if (new_host->GetParent())
|
||||
return;
|
||||
frontend_host_.reset(content::DevToolsFrontendHost::Create(
|
||||
frontend_host_ = content::DevToolsFrontendHost::Create(
|
||||
new_host,
|
||||
base::Bind(&InspectableWebContentsImpl::HandleMessageFromDevToolsFrontend,
|
||||
weak_factory_.GetWeakPtr())));
|
||||
weak_factory_.GetWeakPtr()));
|
||||
}
|
||||
|
||||
void InspectableWebContentsImpl::WebContentsDestroyed() {
|
||||
@@ -836,11 +836,11 @@ void InspectableWebContentsImpl::ReadyToCommitNavigation(
|
||||
frontend_host_) {
|
||||
return;
|
||||
}
|
||||
frontend_host_.reset(content::DevToolsFrontendHost::Create(
|
||||
frontend_host_ = content::DevToolsFrontendHost::Create(
|
||||
web_contents()->GetMainFrame(),
|
||||
base::Bind(
|
||||
&InspectableWebContentsImpl::HandleMessageFromDevToolsFrontend,
|
||||
base::Unretained(this))));
|
||||
base::Unretained(this)));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user