summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync
diff options
context:
space:
mode:
authorzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-24 19:08:15 +0000
committerzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-24 19:08:15 +0000
commitd256e6b2991b8d2ba0a613242d545856540f9540 (patch)
tree771389eae254ef226932184cd3bfb7dfd75c0cb5 /chrome/browser/sync
parentedd3b0a50912b04fe9d7e5dbf6f9639144cc09e4 (diff)
downloadchromium_src-d256e6b2991b8d2ba0a613242d545856540f9540.zip
chromium_src-d256e6b2991b8d2ba0a613242d545856540f9540.tar.gz
chromium_src-d256e6b2991b8d2ba0a613242d545856540f9540.tar.bz2
Update Signal Thread to use ref counting and locks to ensure thread safety.
Review URL: http://codereview.chromium.org/418042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32948 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync')
-rw-r--r--chrome/browser/sync/notifier/base/signal_thread_task.h3
-rw-r--r--chrome/browser/sync/notifier/listener/mediator_thread_impl.cc2
2 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/sync/notifier/base/signal_thread_task.h b/chrome/browser/sync/notifier/base/signal_thread_task.h
index ebee005..82853a3 100644
--- a/chrome/browser/sync/notifier/base/signal_thread_task.h
+++ b/chrome/browser/sync/notifier/base/signal_thread_task.h
@@ -77,7 +77,8 @@ class SignalThreadTask : public talk_base::Task,
void ClearSignalThread() {
if (signal_thread_) {
- signal_thread_->Destroy();
+ // Don't wait on the thread destruction, or we may deadlock.
+ signal_thread_->Destroy(false);
signal_thread_ = NULL;
}
}
diff --git a/chrome/browser/sync/notifier/listener/mediator_thread_impl.cc b/chrome/browser/sync/notifier/listener/mediator_thread_impl.cc
index 62d44c0..d688b7e 100644
--- a/chrome/browser/sync/notifier/listener/mediator_thread_impl.cc
+++ b/chrome/browser/sync/notifier/listener/mediator_thread_impl.cc
@@ -68,7 +68,7 @@ void MediatorThreadImpl::Run() {
pump_->WakeTasks();
}
MessageLoop::current()->RunAllPending();
- } while (!IsStopping());
+ } while (!IsQuitting());
#if defined(OS_WIN)
set_socketserver(old_socket_server);