diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-17 19:25:04 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-17 19:25:04 +0000 |
commit | 4554c236675f1d938a358738f300021487b8c34e (patch) | |
tree | 6139f3ba54d6a0fe2a1ed7d69a93c6cb3e9cd39b /base/message_pump_mac.h | |
parent | 637d3443eccf1633e28ec473e8e2f36611d7b148 (diff) | |
download | chromium_src-4554c236675f1d938a358738f300021487b8c34e.zip chromium_src-4554c236675f1d938a358738f300021487b8c34e.tar.gz chromium_src-4554c236675f1d938a358738f300021487b8c34e.tar.bz2 |
MessagePump implementations should call DoWork and DoDelayedWork at equal
priority.
BUG=72007
TEST=base_unittests --gtest_filter=MessageLoopTest.RecursiveDenial3
Review URL: http://codereview.chromium.org/6507017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75294 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_pump_mac.h')
-rw-r--r-- | base/message_pump_mac.h | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/base/message_pump_mac.h b/base/message_pump_mac.h index c30a8ea..b903a1a 100644 --- a/base/message_pump_mac.h +++ b/base/message_pump_mac.h @@ -86,24 +86,17 @@ class MessagePumpCFRunLoopBase : public MessagePump { private: // Timer callback scheduled by ScheduleDelayedWork. This does not do any - // work, but it signals delayed_work_source_ so that delayed work can be - // performed within the appropriate priority constraints. + // work, but it signals work_source_ so that delayed work can be performed + // within the appropriate priority constraints. static void RunDelayedWorkTimer(CFRunLoopTimerRef timer, void* info); // Perform highest-priority work. This is associated with work_source_ - // signalled by ScheduleWork. The static method calls the instance method; - // the instance method returns true if work was done. + // signalled by ScheduleWork or RunDelayedWorkTimer. The static method calls + // the instance method; the instance method returns true if it resignalled + // work_source_ to be called again from the loop. static void RunWorkSource(void* info); bool RunWork(); - // Perform delayed-priority work. This is associated with - // delayed_work_source_ signalled by RunDelayedWorkTimer, and is responsible - // for calling ScheduleDelayedWork again if appropriate. The static method - // calls the instance method; the instance method returns true if more - // delayed work is available. - static void RunDelayedWorkSource(void* info); - bool RunDelayedWork(); - // Perform idle-priority work. This is normally called by PreWaitObserver, // but is also associated with idle_work_source_. When this function // actually does perform idle work, it will resignal that source. The @@ -162,7 +155,6 @@ class MessagePumpCFRunLoopBase : public MessagePump { // callbacks. CFRunLoopTimerRef delayed_work_timer_; CFRunLoopSourceRef work_source_; - CFRunLoopSourceRef delayed_work_source_; CFRunLoopSourceRef idle_work_source_; CFRunLoopSourceRef nesting_deferred_work_source_; CFRunLoopObserverRef pre_wait_observer_; @@ -202,7 +194,6 @@ class MessagePumpCFRunLoopBase : public MessagePump { // any call to Run on the stack. The Run method will check for delegateless // work on entry and redispatch it as needed once a delegate is available. bool delegateless_work_; - bool delegateless_delayed_work_; bool delegateless_idle_work_; DISALLOW_COPY_AND_ASSIGN(MessagePumpCFRunLoopBase); |