summaryrefslogtreecommitdiffstats
path: root/base/message_loop.cc
diff options
context:
space:
mode:
authordarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-07 08:52:31 +0000
committerdarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-07 08:52:31 +0000
commit06c6a6ca0e2c99d399c9b9802d44451919a510c7 (patch)
tree7a588f51347a3e401ce1a191b5cb3770d71e9ca8 /base/message_loop.cc
parent752578567cc199568f0522fd0a95589d5cc822fc (diff)
downloadchromium_src-06c6a6ca0e2c99d399c9b9802d44451919a510c7.zip
chromium_src-06c6a6ca0e2c99d399c9b9802d44451919a510c7.tar.gz
chromium_src-06c6a6ca0e2c99d399c9b9802d44451919a510c7.tar.bz2
Fix purify MLK errors resulting from my previous check-in. The TimerManager previously deleted pending timers. We need to do the same for PostDelayedTask. This CL makes it so.
TBR=jar Review URL: http://codereview.chromium.org/1607 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1826 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop.cc')
-rw-r--r--base/message_loop.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/message_loop.cc b/base/message_loop.cc
index 181d76f..fffeb09 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -113,6 +113,13 @@ MessageLoop::~MessageLoop() {
ReloadWorkQueue();
DeletePendingTasks();
+ // Delete tasks in the delayed work queue.
+ while (!delayed_work_queue_.empty()) {
+ Task* task = delayed_work_queue_.top().task;
+ delayed_work_queue_.pop();
+ delete task;
+ }
+
#if defined(OS_WIN)
// Match timeBeginPeriod() from construction.
timeEndPeriod(1);