Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2929)

Unified Diff: base/threading/thread.cc

Issue 11794032: base: Update the calls from MessageLoop::Quit() to QuitWhenIdle(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/synchronization/waitable_event_watcher_unittest.cc ('k') | base/timer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/thread.cc
diff --git a/base/threading/thread.cc b/base/threading/thread.cc
index f4ba3ff80aba57ddf85e949bb5a204817cf2fced..8e506ef4ec7347b4d0154717b2bac0ec21cedc00 100644
--- a/base/threading/thread.cc
+++ b/base/threading/thread.cc
@@ -21,8 +21,8 @@ namespace {
// We use this thread-local variable to record whether or not a thread exited
// because its Stop method was called. This allows us to catch cases where
-// MessageLoop::Quit() is called directly, which is unexpected when using a
-// Thread to setup and run a MessageLoop.
+// MessageLoop::QuitWhenIdle() is called directly, which is unexpected when
+// using a Thread to setup and run a MessageLoop.
base::LazyInstance<base::ThreadLocalBoolean> lazy_tls_bool =
LAZY_INSTANCE_INITIALIZER;
@@ -30,7 +30,7 @@ base::LazyInstance<base::ThreadLocalBoolean> lazy_tls_bool =
// This is used to trigger the message loop to exit.
void ThreadQuitHelper() {
- MessageLoop::current()->Quit();
+ MessageLoop::current()->QuitWhenIdle();
Thread::SetThreadWasQuitProperly(true);
}
« no previous file with comments | « base/synchronization/waitable_event_watcher_unittest.cc ('k') | base/timer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698