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

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

Issue 2125213002: [IndexedDB] Propogating changes to observers : Renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lifetime
Patch Set: Filtering Changes to Observer : Browser End Created 4 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
Index: content/browser/indexed_db/indexed_db_callbacks.cc
diff --git a/content/browser/indexed_db/indexed_db_callbacks.cc b/content/browser/indexed_db/indexed_db_callbacks.cc
index 6c541b7d5d88d0ba2a54d5441037ef561c101f3e..f0be17a4b0b4e5d79b78a03db81b92f10b659653 100644
--- a/content/browser/indexed_db/indexed_db_callbacks.cc
+++ b/content/browser/indexed_db/indexed_db_callbacks.cc
@@ -161,8 +161,11 @@ void IndexedDBCallbacks::OnUpgradeNeeded(
DCHECK_NE(kNoDatabaseCallbacks, ipc_database_callbacks_id_);
dispatcher_host_->RegisterTransactionId(host_transaction_id_, origin_);
+ IndexedDBConnection* connection_ptr = connection.get();
int32_t ipc_database_id =
dispatcher_host_->Add(connection.release(), ipc_thread_id_, origin_);
+ connection_ptr->setId(ipc_database_id);
+
if (ipc_database_id < 0)
return;
ipc_database_id_ = ipc_database_id;
@@ -200,10 +203,11 @@ void IndexedDBCallbacks::OnSuccess(
int32_t ipc_object_id = kNoDatabase;
// Only register if the connection was not previously sent in OnUpgradeNeeded.
if (ipc_database_id_ == kNoDatabase) {
+ IndexedDBConnection* connection_ptr = connection.get();
ipc_object_id =
dispatcher_host_->Add(connection.release(), ipc_thread_id_, origin_);
+ connection_ptr->setId(ipc_object_id);
cmumford 2016/07/07 21:14:21 IndexedDBDispatcherHost::Add() will delete connect
}
-
dispatcher_host_->Send(new IndexedDBMsg_CallbacksSuccessIDBDatabase(
ipc_thread_id_,
ipc_callbacks_id_,
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_connection.h » ('j') | content/browser/indexed_db/indexed_db_connection.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698