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

Unified Diff: base/threading/thread.cc

Issue 1471123002: Don't leak the WatcherThreadManager background thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: also posix Created 5 years, 1 month 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 | « no previous file | mojo/edk/system/raw_channel.h » ('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 c775fe749b1153cc0f29eb6d6ed9d50203e5ffa0..9d1ca8efa3f1e43bd5b82cddf93048fa7b2eb8e6 100644
--- a/base/threading/thread.cc
+++ b/base/threading/thread.cc
@@ -262,8 +262,12 @@ void Thread::ThreadMain() {
com_initializer.reset();
#endif
- // Assert that MessageLoop::QuitWhenIdle was called by ThreadQuitHelper.
- DCHECK(GetThreadWasQuitProperly());
+ if (message_loop->type() != MessageLoop::TYPE_CUSTOM) {
+ // Assert that MessageLoop::QuitWhenIdle was called by ThreadQuitHelper.
+ // Don't check for custom message pumps, because their shutdown might not
+ // allow this.
+ DCHECK(GetThreadWasQuitProperly());
+ }
// We can't receive messages anymore.
// (The message loop is destructed at the end of this block)
« no previous file with comments | « no previous file | mojo/edk/system/raw_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698