diff options
author | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-16 09:02:52 +0000 |
---|---|---|
committer | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-16 09:02:52 +0000 |
commit | 49373c988b59de09ce3cc432f6465c1bf7d3da50 (patch) | |
tree | de406621b96fa46dfaa39528bf237322c24c4224 /chrome/browser/chrome_content_browser_client.cc | |
parent | e29e3f552af122c042dde824952e477ef6e5263c (diff) | |
download | chromium_src-49373c988b59de09ce3cc432f6465c1bf7d3da50.zip chromium_src-49373c988b59de09ce3cc432f6465c1bf7d3da50.tar.gz chromium_src-49373c988b59de09ce3cc432f6465c1bf7d3da50.tar.bz2 |
Fix for a crasher when starting a renderer.
A crash dump from the field reports that the CrashDumpManager in
ChromeContentBrowserClient is not initialized when
GetAdditionalMappedFilesForChildProcess is called.
This is because the CrashDumpManager is initialized when a RenderProcessHost
is created, but it could be the case that a BrowserChildProcessHost gets
created first and calls GetAdditionalMappedFilesForChildProcess before
any RenderProcessHost was created.
Making the CrashDumpManager a singleton initialized early on to prevent this
crasher.
BUG=163456
TEST=None
Review URL: https://chromiumcodereview.appspot.com/11884042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177110 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chrome_content_browser_client.cc')
-rw-r--r-- | chrome/browser/chrome_content_browser_client.cc | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 53ab0ed..ddcc370 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -619,10 +619,6 @@ void ChromeContentBrowserClient::RenderProcessHostCreated( RendererContentSettingRules rules; GetRendererContentSettingRules(profile->GetHostContentSettingsMap(), &rules); host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); - -#if defined(OS_ANDROID) && defined(USE_LINUX_BREAKPAD) - InitCrashDumpManager(); -#endif } content::WebUIControllerFactory* @@ -1846,7 +1842,7 @@ void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( FileDescriptor(f, true))); #if defined(USE_LINUX_BREAKPAD) - f = crash_dump_manager_->CreateMinidumpFile(child_process_id); + f = CrashDumpManager::GetInstance()->CreateMinidumpFile(child_process_id); if (f == base::kInvalidPlatformFileValue) { LOG(ERROR) << "Failed to create file for minidump, crash reporting will be " "disabled for this process."; @@ -1873,13 +1869,6 @@ const wchar_t* ChromeContentBrowserClient::GetResourceDllName() { } #endif -#if defined(OS_ANDROID) -void ChromeContentBrowserClient::InitCrashDumpManager() { - if (!crash_dump_manager_.get()) - crash_dump_manager_.reset(new CrashDumpManager()); -} -#endif - #if defined(USE_NSS) crypto::CryptoModuleBlockingPasswordDelegate* ChromeContentBrowserClient::GetCryptoPasswordDelegate( |