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

Unified Diff: components/safe_browsing_db/v4_database.cc

Issue 2425703004: Destroy store on task runner. That's where all store operations happen. (Closed)
Patch Set: Created 4 years, 2 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 | components/safe_browsing_db/v4_store.h » ('j') | components/safe_browsing_db/v4_store.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/safe_browsing_db/v4_database.cc
diff --git a/components/safe_browsing_db/v4_database.cc b/components/safe_browsing_db/v4_database.cc
index 30a3b0f538d5756e5314329a88cdfb9a5f0191dd..dc64e42f829d636133610ca557095cc47429d997 100644
--- a/components/safe_browsing_db/v4_database.cc
+++ b/components/safe_browsing_db/v4_database.cc
@@ -142,6 +142,7 @@ void V4Database::UpdatedStoreReady(ListIdentifier identifier,
DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(pending_store_updates_);
if (new_store) {
+ V4Store::Destroy(std::move((*store_map_)[identifier]));
(*store_map_)[identifier] = std::move(new_store);
Scott Hess - ex-Googler 2016/10/18 02:57:01 Does this work? I mean, I think it probably does,
Scott Hess - ex-Googler 2016/10/18 02:57:55 Or, of course: (*store_map_)[identifier].swap(new
}
« no previous file with comments | « no previous file | components/safe_browsing_db/v4_store.h » ('j') | components/safe_browsing_db/v4_store.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698