Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3975)

Unified Diff: base/message_loop.cc

Issue 42083: Avoid leaks at shutdown when running purify... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop.cc
===================================================================
--- base/message_loop.cc (revision 11430)
+++ base/message_loop.cc (working copy)
@@ -365,15 +365,21 @@
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()) {
+ Task* task = deferred_non_nestable_work_queue_.front().task;
+ deferred_non_nestable_work_queue_.pop();
// TODO(darin): Delete all tasks once it is safe to do so.
- //Task* task = deferred_non_nestable_work_queue_.front().task;
- deferred_non_nestable_work_queue_.pop();
- //delete task;
+ // 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()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698