| Index: content/shell/browser/shell_browser_main_parts.cc
|
| diff --git a/content/shell/browser/shell_browser_main_parts.cc b/content/shell/browser/shell_browser_main_parts.cc
|
| index 53562759bf1ee0d8bee17594f3422d2c30bbeee4..1512ae12ce0cbe5858aa22ca22854128b27f7c58 100644
|
| --- a/content/shell/browser/shell_browser_main_parts.cc
|
| +++ b/content/shell/browser/shell_browser_main_parts.cc
|
| @@ -87,10 +87,7 @@ ShellBrowserMainParts::ShellBrowserMainParts(
|
| }
|
|
|
| ShellBrowserMainParts::~ShellBrowserMainParts() {
|
| - if (devtools_http_handler_) {
|
| - // Note that Stop destroys devtools_http_handler_.
|
| - devtools_http_handler_->Stop();
|
| - }
|
| + DCHECK(!devtools_http_handler_);
|
| }
|
|
|
| #if !defined(OS_MACOSX)
|
| @@ -147,9 +144,8 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() {
|
| Shell::Initialize();
|
| net::NetModule::SetResourceProvider(PlatformResourceProvider);
|
|
|
| - // CreateHttpHandler retains ownership over DevToolsHttpHandler.
|
| - devtools_http_handler_ =
|
| - ShellDevToolsManagerDelegate::CreateHttpHandler(browser_context_.get());
|
| + devtools_http_handler_.reset(
|
| + ShellDevToolsManagerDelegate::CreateHttpHandler(browser_context_.get()));
|
|
|
| InitializeMessageLoopContext();
|
|
|
| @@ -165,11 +161,7 @@ bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) {
|
| }
|
|
|
| void ShellBrowserMainParts::PostMainMessageLoopRun() {
|
| - if (devtools_http_handler_) {
|
| - // Note that Stop destroys devtools_http_handler_.
|
| - devtools_http_handler_->Stop();
|
| - devtools_http_handler_ = nullptr;
|
| - }
|
| + devtools_http_handler_.reset();
|
| browser_context_.reset();
|
| off_the_record_browser_context_.reset();
|
| }
|
|
|