Index: headless/lib/browser/headless_content_browser_client.cc |
diff --git a/headless/lib/browser/headless_content_browser_client.cc b/headless/lib/browser/headless_content_browser_client.cc |
index 23ddee0d580d82b1e46cd70a0a8d56cc652c9916..4a52361a0efd4932d9f2a422e099c9060c1f26a9 100644 |
--- a/headless/lib/browser/headless_content_browser_client.cc |
+++ b/headless/lib/browser/headless_content_browser_client.cc |
@@ -30,7 +30,11 @@ content::BrowserMainParts* HeadlessContentBrowserClient::CreateBrowserMainParts( |
content::DevToolsManagerDelegate* |
HeadlessContentBrowserClient::GetDevToolsManagerDelegate() { |
- return new HeadlessDevToolsManagerDelegate(browser_); |
+ std::unique_ptr<HeadlessDevToolsManagerDelegate> devtools_manager_delegate = |
Eric Seckler
2016/08/03 12:17:57
do we need a unique_ptr here? (I find it a little
altimin
2016/08/03 12:46:18
We're using unique_ptr to show that we're explicit
Eric Seckler
2016/08/03 13:55:30
Hm, I guess this was a misguided feeling influence
|
+ base::WrapUnique(new HeadlessDevToolsManagerDelegate(browser_)); |
+ browser_->set_devtools_manager_delegate( |
+ devtools_manager_delegate->GetWeakPtr()); |
+ return devtools_manager_delegate.release(); |
} |
} // namespace headless |