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

Unified Diff: base/threading/worker_pool.cc

Issue 23514070: Annotate WorkerPool::PostTaskAndReply as leaky. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: improved the comment Created 7 years, 3 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/threading/worker_pool.cc
diff --git a/base/threading/worker_pool.cc b/base/threading/worker_pool.cc
index 9e45f8c89b8ea7964e73bfb328ffc3e2e3694407..9e5e64c7f97d061d031dc0df678cc7df9a4f5e44 100644
--- a/base/threading/worker_pool.cc
+++ b/base/threading/worker_pool.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/compiler_specific.h"
+#include "base/debug/leak_annotations.h"
#include "base/lazy_instance.h"
#include "base/task_runner.h"
#include "base/threading/post_task_and_reply_impl.h"
@@ -104,6 +105,12 @@ bool WorkerPool::PostTaskAndReply(const tracked_objects::Location& from_here,
const Closure& task,
const Closure& reply,
bool task_is_slow) {
+ // Do not report PostTaskAndReplyRelay leaks in tests. There's nothing we can
+ // do about them because WorkerPool doesn't have a flushing API.
+ // http://crbug.com/248513
+ // http://crbug.com/290897
+ // Note: this annotation does not cover tasks posted through a TaskRunner.
+ ANNOTATE_SCOPED_MEMORY_LEAK;
return PostTaskAndReplyWorkerPool(task_is_slow).PostTaskAndReply(
from_here, task, reply);
}
« 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