summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-25 23:12:53 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-25 23:12:53 +0000
commit8411ad62509db62b1bb5a1e4d4a3488e8c48f037 (patch)
treed8d12327df14863e6a3ca6a6ca23997f2ab876c2 /base
parent111f928c57720b130f374eb6a0ad300d180e3a7d (diff)
downloadchromium_src-8411ad62509db62b1bb5a1e4d4a3488e8c48f037.zip
chromium_src-8411ad62509db62b1bb5a1e4d4a3488e8c48f037.tar.gz
chromium_src-8411ad62509db62b1bb5a1e4d4a3488e8c48f037.tar.bz2
When falling out of a nested loop, if higher-priority work is done, be sure to
still arrange to run lower-priority work on a subsequent pass. BUG=13468 TEST=http://crbug.com/13468#c5 Review URL: http://codereview.chromium.org/149029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19305 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/message_pump_mac.mm10
1 files changed, 10 insertions, 0 deletions
diff --git a/base/message_pump_mac.mm b/base/message_pump_mac.mm
index 5f9d805..007d202 100644
--- a/base/message_pump_mac.mm
+++ b/base/message_pump_mac.mm
@@ -263,12 +263,22 @@ void MessagePumpCFRunLoopBase::RunNestingDeferredWorkSource(void* info) {
// Called by MessagePumpCFRunLoopBase::RunNestingDeferredWorkSource.
bool MessagePumpCFRunLoopBase::RunNestingDeferredWork() {
+ // Immediately try work in priority order.
if (!RunWork()) {
if (!RunDelayedWork()) {
if (!RunIdleWork()) {
return false;
}
+ } else {
+ // There was no work, and delayed work was done. Arrange for the loop
+ // to try non-nestable idle work on a subsequent pass.
+ CFRunLoopSourceSignal(idle_work_source_);
}
+ } else {
+ // Work was done. Arrange for the loop to try non-nestable delayed and
+ // idle work on a subsequent pass.
+ CFRunLoopSourceSignal(delayed_work_source_);
+ CFRunLoopSourceSignal(idle_work_source_);
}
return true;