diff options
author | kalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-21 06:21:57 +0000 |
---|---|---|
committer | kalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-21 06:21:57 +0000 |
commit | 51718596075d217dc0c8ffdb6bd624fe068fd0c9 (patch) | |
tree | e468f8c6ea99d5138c30faa8ac0ad85de0bada16 /base | |
parent | 653ab371dfdc3d593433aeb05b856f721aeb01fb (diff) | |
download | chromium_src-51718596075d217dc0c8ffdb6bd624fe068fd0c9.zip chromium_src-51718596075d217dc0c8ffdb6bd624fe068fd0c9.tar.gz chromium_src-51718596075d217dc0c8ffdb6bd624fe068fd0c9.tar.bz2 |
Make MessageLoop::QuitClosure call Quit of the current MessageLoop at call time, not the current MessageLoop at the Closure's creation time. This brings the behaviour of QuitClosure in line with QuitTask.
BUG=
TEST=
Review URL: http://codereview.chromium.org/8354032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106684 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/message_loop.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/base/message_loop.cc b/base/message_loop.cc index f2e07b9..45bad48 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) { |