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

Unified Diff: content/browser/indexed_db/indexed_db_dispatcher_host.cc

Issue 2439863002: Prevent cross-thread refcounting for thread-unsafe IndexedDBCallbacks. (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 | « content/browser/indexed_db/indexed_db_database_callbacks.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/indexed_db/indexed_db_dispatcher_host.cc
diff --git a/content/browser/indexed_db/indexed_db_dispatcher_host.cc b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
index 33d9779ccb785698523ef54dc02d23fedcaa8e6b..fe3bf9fb1472df4411c0d921306800a6af2b659b 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.cc
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
@@ -293,7 +293,7 @@ void IndexedDBDispatcherHost::GetDatabaseNames(
indexed_db_context_->TaskRunner()->PostTask(
FROM_HERE,
base::Bind(&IndexedDBDispatcherHost::GetDatabaseNamesOnIDBThread, this,
- callbacks, origin));
+ base::Passed(&callbacks), origin));
}
void IndexedDBDispatcherHost::Open(
@@ -319,8 +319,9 @@ void IndexedDBDispatcherHost::Open(
std::move(database_callbacks_info)));
indexed_db_context_->TaskRunner()->PostTask(
FROM_HERE,
- base::Bind(&IndexedDBDispatcherHost::OpenOnIDBThread, this, callbacks,
- database_callbacks, origin, name, version, transaction_id));
+ base::Bind(&IndexedDBDispatcherHost::OpenOnIDBThread, this,
+ base::Passed(&callbacks), base::Passed(&database_callbacks),
+ origin, name, version, transaction_id));
}
void IndexedDBDispatcherHost::DeleteDatabase(
@@ -338,7 +339,7 @@ void IndexedDBDispatcherHost::DeleteDatabase(
new IndexedDBCallbacks(this, origin, std::move(callbacks_info)));
indexed_db_context_->TaskRunner()->PostTask(
FROM_HERE, base::Bind(&IndexedDBDispatcherHost::DeleteDatabaseOnIDBThread,
- this, callbacks, origin, name));
+ this, base::Passed(&callbacks), origin, name));
}
void IndexedDBDispatcherHost::GetDatabaseNamesOnIDBThread(
« no previous file with comments | « content/browser/indexed_db/indexed_db_database_callbacks.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698