summaryrefslogtreecommitdiffstats
path: root/chrome/browser/crash_handler_host_linux.cc
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-16 19:44:09 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-16 19:44:09 +0000
commit19eef069c3a53544627254e54f88ae8bbc8c40a7 (patch)
tree159ae40d233afad309702dfb7e0f1272617bf5d4 /chrome/browser/crash_handler_host_linux.cc
parent90db7d15b2e3b9be1e9d4131b32bf5616cf11d0f (diff)
downloadchromium_src-19eef069c3a53544627254e54f88ae8bbc8c40a7.zip
chromium_src-19eef069c3a53544627254e54f88ae8bbc8c40a7.tar.gz
chromium_src-19eef069c3a53544627254e54f88ae8bbc8c40a7.tar.bz2
Linux: Fix pure call in CrashHandlerHostLinux::Init().
BUG=55780 TEST=no more random crashes on startup. Review URL: http://codereview.chromium.org/3417005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59696 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/crash_handler_host_linux.cc')
-rw-r--r--chrome/browser/crash_handler_host_linux.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/chrome/browser/crash_handler_host_linux.cc b/chrome/browser/crash_handler_host_linux.cc
index 06ceb96..6f3d183 100644
--- a/chrome/browser/crash_handler_host_linux.cc
+++ b/chrome/browser/crash_handler_host_linux.cc
@@ -83,11 +83,6 @@ CrashHandlerHostLinux::~CrashHandlerHostLinux() {
}
void CrashHandlerHostLinux::Init() {
- SetProcessType();
- uploader_thread_.reset(
- new base::Thread(std::string(process_type_ + "_crash_uploader").c_str()));
- uploader_thread_->Start();
-
MessageLoopForIO* ml = MessageLoopForIO::current();
CHECK(ml->WatchFileDescriptor(
browser_socket_, true /* persistent */,
@@ -96,6 +91,13 @@ void CrashHandlerHostLinux::Init() {
ml->AddDestructionObserver(this);
}
+void CrashHandlerHostLinux::InitCrashUploaderThread() {
+ SetProcessType();
+ uploader_thread_.reset(
+ new base::Thread(std::string(process_type_ + "_crash_uploader").c_str()));
+ uploader_thread_->Start();
+}
+
void CrashHandlerHostLinux::OnFileCanWriteWithoutBlocking(int fd) {
DCHECK(false);
}
@@ -336,6 +338,7 @@ void CrashHandlerHostLinux::WillDestroyCurrentMessageLoop() {
}
PluginCrashHandlerHostLinux::PluginCrashHandlerHostLinux() {
+ InitCrashUploaderThread();
}
PluginCrashHandlerHostLinux::~PluginCrashHandlerHostLinux() {
@@ -346,6 +349,7 @@ void PluginCrashHandlerHostLinux::SetProcessType() {
}
RendererCrashHandlerHostLinux::RendererCrashHandlerHostLinux() {
+ InitCrashUploaderThread();
}
RendererCrashHandlerHostLinux::~RendererCrashHandlerHostLinux() {