diff options
Diffstat (limited to 'chrome/browser/crash_handler_host_linux.cc')
-rw-r--r-- | chrome/browser/crash_handler_host_linux.cc | 14 |
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() { |