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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.cpp

Issue 2601983002: [IndexedDB] Adding transaction and value support to observers (Closed)
Patch Set: Replying to comments, disallowed observing from versionchange txn Created 3 years, 11 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: third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.cpp
index f3bde6ff7b7cb42783f236a299d0c5c2f8097dcd..f84e13e9d47841be6682931b521a2df34c81be60 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.cpp
@@ -32,14 +32,25 @@ IDBObserverChanges* IDBObserverChanges::create(
IDBDatabase* database,
const WebVector<WebIDBObservation>& observations,
const WebVector<int32_t>& observationIndex) {
- return new IDBObserverChanges(database, observations, observationIndex);
+ return new IDBObserverChanges(database, nullptr, observations,
+ observationIndex);
+}
+
+IDBObserverChanges* IDBObserverChanges::create(
+ IDBDatabase* database,
+ IDBTransaction* transaction,
+ const WebVector<WebIDBObservation>& observations,
+ const WebVector<int32_t>& observationIndex) {
+ return new IDBObserverChanges(database, transaction, observations,
+ observationIndex);
}
IDBObserverChanges::IDBObserverChanges(
IDBDatabase* database,
+ IDBTransaction* transaction,
const WebVector<WebIDBObservation>& observations,
const WebVector<int32_t>& observationIndex)
- : m_database(database) {
+ : m_database(database), m_transaction(transaction) {
extractChanges(observations, observationIndex);
}

Powered by Google App Engine
This is Rietveld 408576698