Commit 38387cfe authored by jochen@chromium.org's avatar jochen@chromium.org

[content shell] don't leak the devtools delegate

BUG=246359
R=pfeldman@chromium.org

Review URL: https://chromiumcodereview.appspot.com/16360007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204033 0039d316-1c4b-4281-b951-d872f2087c98
parent af4256d5
......@@ -122,7 +122,7 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() {
Shell::Initialize();
net::NetModule::SetResourceProvider(PlatformResourceProvider);
devtools_delegate_ = new ShellDevToolsDelegate(browser_context_.get());
devtools_delegate_.reset(new ShellDevToolsDelegate(browser_context_.get()));
if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) {
Shell::CreateNewWindow(browser_context_.get(),
......
......@@ -33,7 +33,9 @@ class ShellBrowserMainParts : public BrowserMainParts {
virtual bool MainMessageLoopRun(int* result_code) OVERRIDE;
virtual void PostMainMessageLoopRun() OVERRIDE;
ShellDevToolsDelegate* devtools_delegate() { return devtools_delegate_; }
ShellDevToolsDelegate* devtools_delegate() {
return devtools_delegate_.get();
}
ShellBrowserContext* browser_context() { return browser_context_.get(); }
ShellBrowserContext* off_the_record_browser_context() {
......@@ -48,7 +50,7 @@ class ShellBrowserMainParts : public BrowserMainParts {
const MainFunctionParams& parameters_;
bool run_message_loop_;
ShellDevToolsDelegate* devtools_delegate_;
scoped_ptr<ShellDevToolsDelegate> devtools_delegate_;
#if defined(ENABLE_PLUGINS)
scoped_ptr<ShellPluginServiceFilter> plugin_service_filter_;
#endif
......
......@@ -7325,19 +7325,6 @@ fun:_ZN7content21RenderViewHostManager8NavigateERKNS_19NavigationEntryImplE
fun:_ZN7content21ContentMainRunnerImpl3RunEv
fun:_ZN7content11ContentMainEiPPKcPNS_19ContentMainDelegateE
}
{
bug_246359
Memcheck:Leak
fun:_Znw*
fun:_ZN7content21ShellBrowserMainParts21PreMainMessageLoopRunEv
fun:_ZN7content15BrowserMainLoop13CreateThreadsEv
fun:_ZN7content21BrowserMainRunnerImpl10InitializeERKNS_18MainFunctionParamsE
fun:_Z16ShellBrowserMainRKN7content18MainFunctionParamsE
fun:_ZN7content17ShellMainDelegate10RunProcessERKSsRKNS_18MainFunctionParamsE
fun:_ZN7content23RunNamedProcessTypeMainERKSsRKNS_18MainFunctionParamsEPNS_19ContentMainDelegateE
fun:_ZN7content21ContentMainRunnerImpl3RunEv
fun:_ZN7content11ContentMainEiPPKcPNS_19ContentMainDelegateE
}
{
bug_245866
Memcheck:Leak
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment