summaryrefslogtreecommitdiffstats
path: root/chrome/common/child_thread.cc
diff options
context:
space:
mode:
authordimich@chromium.org <dimich@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-26 19:16:16 +0000
committerdimich@chromium.org <dimich@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-26 19:16:16 +0000
commitecc0738c8ec3fe083ea639740e4a3ebbc695114d (patch)
treea72e92b51e43517066da693350282f6ccaed4161 /chrome/common/child_thread.cc
parentbeda4150e41daa8f6aa91e788fccce2a3e9aca00 (diff)
downloadchromium_src-ecc0738c8ec3fe083ea639740e4a3ebbc695114d.zip
chromium_src-ecc0738c8ec3fe083ea639740e4a3ebbc695114d.tar.gz
chromium_src-ecc0738c8ec3fe083ea639740e4a3ebbc695114d.tar.bz2
Un-revert r39999, now with a Valgrind fix. Original change: http://codereview.chromium.org/647064
BUG=35963 TEST=WorkerTest.StressJSExecution Review URL: http://codereview.chromium.org/661139 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40141 0039d316-1c4b-4281-b951-d872f2087c98
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;
}