diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-10 00:37:07 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-10 00:37:07 +0000 |
commit | 001747c6c07c3755ca7ac136e6b7cecfe2afec1b (patch) | |
tree | a64579f732d3e22971daba019d09e040afd45ade /base/message_loop.h | |
parent | cc6cd3484260c20f59a6abd8f52d7b1f18b2e973 (diff) | |
download | chromium_src-001747c6c07c3755ca7ac136e6b7cecfe2afec1b.zip chromium_src-001747c6c07c3755ca7ac136e6b7cecfe2afec1b.tar.gz chromium_src-001747c6c07c3755ca7ac136e6b7cecfe2afec1b.tar.bz2 |
Put back r1891 with some task deletion disabled to maintain backwards compat and thereby avoid unexpected crashes.
r=jar
Review URL: http://codereview.chromium.org/1664
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1959 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop.h')
-rw-r--r-- | base/message_loop.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/base/message_loop.h b/base/message_loop.h index 53c832a..f4511f8 100644 --- a/base/message_loop.h +++ b/base/message_loop.h @@ -316,14 +316,18 @@ class MessageLoop : public base::MessagePump::Delegate { // cannot be run right now. Returns true if the task was run. bool DeferOrRunPendingTask(const PendingTask& pending_task); + // Adds the pending task to delayed_work_queue_. + void AddToDelayedWorkQueue(const PendingTask& pending_task); + // Load tasks from the incoming_queue_ into work_queue_ if the latter is // empty. The former requires a lock to access, while the latter is directly // accessible on this thread. void ReloadWorkQueue(); // Delete tasks that haven't run yet without running them. Used in the - // destructor to make sure all the task's destructors get called. - void DeletePendingTasks(); + // destructor to make sure all the task's destructors get called. Returns + // true if some work was done. + bool DeletePendingTasks(); // Post a task to our incomming queue. void PostTask_Helper(const tracked_objects::Location& from_here, Task* task, @@ -364,6 +368,7 @@ class MessageLoop : public base::MessagePump::Delegate { scoped_refptr<base::MessagePump> pump_; ObserverList<DestructionObserver> destruction_observers_; + // A recursion block that prevents accidentally running additonal tasks when // insider a (accidentally induced?) nested message pump. bool nestable_tasks_allowed_; |