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

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

Issue 376203002: Fixed use-after-free in LoadCallback in bookmark_storage.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix circular reference 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 | « chrome/browser/bookmarks/chrome_bookmark_client.h ('k') | components/bookmarks/browser/bookmark_storage.h » ('j') | 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 97740b742561f304db62d6546f4cf6b35d00c7e8..19aa1664d244951b7d54748ac2253f3d6c053a79 100644
--- a/chrome/browser/bookmarks/chrome_bookmark_client.cc
+++ b/chrome/browser/bookmarks/chrome_bookmark_client.cc
@@ -17,8 +17,6 @@
#include "chrome/browser/policy/profile_policy_connector.h"
#include "chrome/browser/policy/profile_policy_connector_factory.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/profiles/startup_task_runner_service.h"
-#include "chrome/browser/profiles/startup_task_runner_service_factory.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/bookmarks/browser/bookmark_node.h"
#include "components/history/core/browser/url_database.h"
@@ -171,8 +169,6 @@ bookmarks::LoadExtraCallback ChromeBookmarkClient::GetLoadExtraNodesCallback() {
return base::Bind(
&ChromeBookmarkClient::LoadExtraNodes,
- StartupTaskRunnerServiceFactory::GetForProfile(profile_)
- ->GetBookmarkTaskRunner(),
Joao da Silva 2014/07/09 13:58:16 This is what caused the leak: - this callback is
base::Passed(&managed),
base::Passed(managed_bookmarks_tracker_->GetInitialManagedBookmarks()));
}
@@ -238,11 +234,9 @@ void ChromeBookmarkClient::BookmarkModelLoaded(BookmarkModel* model,
// static
bookmarks::BookmarkPermanentNodeList ChromeBookmarkClient::LoadExtraNodes(
- const scoped_refptr<base::DeferredSequencedTaskRunner>& profile_io_runner,
scoped_ptr<BookmarkPermanentNode> managed_node,
scoped_ptr<base::ListValue> initial_managed_bookmarks,
int64* next_node_id) {
- DCHECK(profile_io_runner->RunsTasksOnCurrentThread());
// Load the initial contents of the |managed_node| now, and assign it an
// unused ID.
int64 managed_id = *next_node_id;
« no previous file with comments | « chrome/browser/bookmarks/chrome_bookmark_client.h ('k') | components/bookmarks/browser/bookmark_storage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698