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

Unified Diff: base/message_loop.cc

Issue 652089: Add MessageLoop::QuitNow and use it to terminate a sync IPC.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 10 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/message_loop.h ('k') | chrome/renderer/renderer_webkitclient_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop.cc
===================================================================
--- base/message_loop.cc (revision 39623)
+++ base/message_loop.cc (working copy)
@@ -233,6 +233,15 @@
}
}
+void MessageLoop::QuitNow() {
+ DCHECK(current() == this);
+ if (state_) {
+ pump_->Quit();
+ } else {
+ NOTREACHED() << "Must be inside Run to call Quit";
+ }
+}
+
void MessageLoop::PostTask(
const tracked_objects::Location& from_here, Task* task) {
PostTask_Helper(from_here, task, 0, true);
« no previous file with comments | « base/message_loop.h ('k') | chrome/renderer/renderer_webkitclient_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698