From bf709abd190dc73fb16a0d9c8a3855a8ce445a90 Mon Sep 17 00:00:00 2001 From: "earthdok@google.com" Date: Mon, 10 Jun 2013 11:32:20 +0000 Subject: Annotate the intentional test-only leak in base/tracked_objects.cc. Remove several HeapChecker suppressions in favor of one annotation. BUG=136936 R=jar@chromium.org CC=glider@chromium.org Review URL: https://chromiumcodereview.appspot.com/16387012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205190 0039d316-1c4b-4281-b951-d872f2087c98 --- base/tracked_objects.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'base/tracked_objects.cc') diff --git a/base/tracked_objects.cc b/base/tracked_objects.cc index 55c1ffe..4449d720 100644 --- a/base/tracked_objects.cc +++ b/base/tracked_objects.cc @@ -8,6 +8,7 @@ #include #include "base/compiler_specific.h" +#include "base/debug/leak_annotations.h" #include "base/format_macros.h" #include "base/memory/scoped_ptr.h" #include "base/process_util.h" @@ -808,8 +809,14 @@ void ThreadData::ShutdownSingleThreadedCleanup(bool leak) { // To avoid any chance of racing in unit tests, which is the only place we // call this function, we may sometimes leak all the data structures we // recovered, as they may still be in use on threads from prior tests! - if (leak) + if (leak) { + ThreadData* thread_data = thread_data_list; + while (thread_data) { + ANNOTATE_LEAKING_OBJECT_PTR(thread_data); + thread_data = thread_data->next(); + } return; + } // When we want to cleanup (on a single thread), here is what we do. -- cgit v1.1