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

Unified Diff: base/message_loop.cc

Issue 8354032: Make MessageLoop::QuitClosure call Quit of the current MessageLoop at call time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop.cc
diff --git a/base/message_loop.cc b/base/message_loop.cc
index f2e07b9fd1c4e8482b301e073bd33a5f1fb49b9f..45bad4889337ce8b6d96e53b898acf891beadc84 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -365,10 +365,13 @@ void MessageLoop::QuitNow() {
}
}
+static void QuitCurrent() {
+ MessageLoop::current()->Quit();
+}
+
// static
base::Closure MessageLoop::QuitClosure() {
- return base::Bind(&MessageLoop::Quit,
- base::Unretained(MessageLoop::current()));
+ return base::Bind(&QuitCurrent);
}
void MessageLoop::SetNestableTasksAllowed(bool allowed) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698