summaryrefslogtreecommitdiffstats
path: root/base/threading
diff options
context:
space:
mode:
authorearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-18 22:19:04 +0000
committerearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-18 22:19:04 +0000
commitca08135b6edf10187667ee38dcd214d7f23fd5b3 (patch)
treefe3adb4491f9026ea52e7f1c77093e56d6410e3b /base/threading
parentb5e6448e80f48b0748697a4211cd8bda50fb14cf (diff)
downloadchromium_src-ca08135b6edf10187667ee38dcd214d7f23fd5b3.zip
chromium_src-ca08135b6edf10187667ee38dcd214d7f23fd5b3.tar.gz
chromium_src-ca08135b6edf10187667ee38dcd214d7f23fd5b3.tar.bz2
Annotate WorkerPool::PostTaskAndReply as leaky.
Tests which use WorkerPool have no way to pump it during teardown, so they will sometimes have leaks of PostTaskAndReply Closures that we can't do anything about. Since we're deprecating WorkerPool anyway, we can just annotate those leaks and forget about them. BUG=290897,248513 R=ajwong@chromium.org Review URL: https://chromiumcodereview.appspot.com/23514070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223960 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/threading')
-rw-r--r--base/threading/worker_pool.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/threading/worker_pool.cc b/base/threading/worker_pool.cc
index 9e45f8c..9e5e64c 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);
}