summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/message_loop.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/base/message_loop.cc b/base/message_loop.cc
index a57946b..3f216dc 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -365,15 +365,21 @@ bool MessageLoop::DeletePendingTasks() {
AddToDelayedWorkQueue(pending_task);
} else {
// TODO(darin): Delete all tasks once it is safe to do so.
- //delete task;
+ // Until it is totally safe, just do it when running purify.
+#ifdef PURIFY
+ delete task;
+#endif // PURIFY
}
}
did_work |= !deferred_non_nestable_work_queue_.empty();
while (!deferred_non_nestable_work_queue_.empty()) {
- // TODO(darin): Delete all tasks once it is safe to do so.
- //Task* task = deferred_non_nestable_work_queue_.front().task;
+ Task* task = deferred_non_nestable_work_queue_.front().task;
deferred_non_nestable_work_queue_.pop();
- //delete task;
+ // TODO(darin): Delete all tasks once it is safe to do so.
+ // Until it is totaly safe, just delete them to keep purify happy.
+#ifdef PURIFY
+ delete task;
+#endif
}
did_work |= !delayed_work_queue_.empty();
while (!delayed_work_queue_.empty()) {