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

Unified Diff: base/message_loop.cc

Issue 9903003: base: Remove should_leak_tasks_ from MessageLoop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « base/message_loop.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop.cc
diff --git a/base/message_loop.cc b/base/message_loop.cc
index 13b0bb610bf21681610e69bd4a85336bf9476663..cc7faa359fa457e080cef72d8be1ff12ea9c0814 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -130,7 +130,6 @@ MessageLoop::MessageLoop(Type type)
exception_restoration_(false),
message_histogram_(NULL),
state_(NULL),
- should_leak_tasks_(true),
#ifdef OS_WIN
os_modal_loop_(false),
#endif // OS_WIN
@@ -509,17 +508,6 @@ void MessageLoop::ReloadWorkQueue() {
bool MessageLoop::DeletePendingTasks() {
bool did_work = !work_queue_.empty();
- // TODO(darin): Delete all tasks once it is safe to do so.
- // Until it is totally safe, just do it when running Valgrind.
- //
- // See http://crbug.com/61131
- //
-#if defined(USE_HEAPCHECKER)
- should_leak_tasks_ = false;
-#else
- if (RunningOnValgrind())
- should_leak_tasks_ = false;
-#endif // defined(OS_POSIX)
while (!work_queue_.empty()) {
PendingTask pending_task = work_queue_.front();
work_queue_.pop();
@@ -541,11 +529,9 @@ bool MessageLoop::DeletePendingTasks() {
// code is replicating legacy behavior, and should not be considered
// absolutely "correct" behavior. See TODO above about deleting all tasks
// when it's safe.
- should_leak_tasks_ = false;
while (!delayed_work_queue_.empty()) {
delayed_work_queue_.pop();
}
- should_leak_tasks_ = true;
return did_work;
}
« no previous file with comments | « base/message_loop.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698