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

Unified Diff: chrome/browser/bookmarks/chrome_bookmark_client.cc

Issue 375683002: Annotate leak in ChromeBookmarkClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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: chrome/browser/bookmarks/chrome_bookmark_client.cc
diff --git a/chrome/browser/bookmarks/chrome_bookmark_client.cc b/chrome/browser/bookmarks/chrome_bookmark_client.cc
index cc590fbc54fb08462e65ba9c0b613afd4458e700..5d236367ff2c29ecdf820423dd7038f9b6370f05 100644
--- a/chrome/browser/bookmarks/chrome_bookmark_client.cc
+++ b/chrome/browser/bookmarks/chrome_bookmark_client.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/debug/leak_annotations.h"
#include "base/logging.h"
#include "base/values.h"
#include "chrome/browser/chrome_notification_types.h"
@@ -165,6 +166,11 @@ bookmarks::LoadExtraCallback ChromeBookmarkClient::GetLoadExtraNodesCallback() {
// Create the managed_node now; it will be populated in the LoadExtraNodes
// callback.
managed_node_ = new BookmarkPermanentNode(0);
+ // The ownership of this object is in limbo until the LoadExtraNodes task
+ // runs, but in a ProfileBrowserTest this never happens.
+ // crbug.com/391508
+ ANNOTATE_LEAKING_OBJECT_PTR(managed_node_);
+
return base::Bind(
&ChromeBookmarkClient::LoadExtraNodes,
StartupTaskRunnerServiceFactory::GetForProfile(profile_)
« 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