diff options
-rw-r--r-- | content/child/indexed_db/indexed_db_dispatcher.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/content/child/indexed_db/indexed_db_dispatcher.cc b/content/child/indexed_db/indexed_db_dispatcher.cc index 9c7bcc4..39f1fae 100644 --- a/content/child/indexed_db/indexed_db_dispatcher.cc +++ b/content/child/indexed_db/indexed_db_dispatcher.cc @@ -458,11 +458,12 @@ void IndexedDBDispatcher::OnSuccessIDBDatabase( return; WebIDBMetadata metadata(ConvertMetadata(idb_metadata)); // If an upgrade was performed, count will be non-zero. + WebIDBDatabase* database = NULL; if (!databases_.count(ipc_object_id)) - databases_[ipc_object_id] = new RendererWebIDBDatabaseImpl( + database = databases_[ipc_object_id] = new RendererWebIDBDatabaseImpl( ipc_object_id, ipc_database_callbacks_id, thread_safe_sender_.get()); DCHECK_EQ(databases_.count(ipc_object_id), 1u); - callbacks->onSuccess(databases_[ipc_object_id], metadata); + callbacks->onSuccess(database, metadata); pending_callbacks_.Remove(ipc_callbacks_id); } |