summaryrefslogtreecommitdiffstats
path: root/chrome/common/child_thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common/child_thread.cc')
-rw-r--r--chrome/common/child_thread.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/common/child_thread.cc b/chrome/common/child_thread.cc
index 5d61738..877a3af 100644
--- a/chrome/common/child_thread.cc
+++ b/chrome/common/child_thread.cc
@@ -30,6 +30,7 @@ ChildThread::ChildThread(const std::string& channel_name)
void ChildThread::Init() {
check_with_browser_before_shutdown_ = false;
+ on_channel_error_called_ = false;
message_loop_ = MessageLoop::current();
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUserAgent)) {
webkit_glue::SetUserAgent(
@@ -71,6 +72,7 @@ ChildThread::~ChildThread() {
}
void ChildThread::OnChannelError() {
+ set_on_channel_error_called(true);
MessageLoop::current()->Quit();
}
@@ -160,7 +162,7 @@ ChildThread* ChildThread::current() {
}
void ChildThread::OnProcessFinalRelease() {
- if (!check_with_browser_before_shutdown_) {
+ if (on_channel_error_called_ || !check_with_browser_before_shutdown_) {
MessageLoop::current()->Quit();
return;
}