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

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

Issue 2314933005: Align IndexedDB metadata rollback on transaction abort to spec. (Closed)
Patch Set: Add failing tests. Created 4 years, 3 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/IDBObjectStore.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.cpp
index 233de166d439ca55a86716d5adae8a0b1e49c79b..6cdc5729ddd796e4feebb1cdf4194765e5b9a23b 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.cpp
@@ -764,7 +764,7 @@ IDBRequest* IDBObjectStore::count(ScriptState* scriptState, const ScriptValue& r
return request;
}
-void IDBObjectStore::abort()
+void IDBObjectStore::versionChangeTransactionAborted()
{
for (auto& index : m_createdIndexes)
index->markDeleted();
@@ -780,6 +780,13 @@ void IDBObjectStore::transactionFinished()
m_createdIndexes.clear();
}
+void IDBObjectStore::rollbackMetadata(const IDBObjectStoreMetadata& previousMetadata)
+{
+ DCHECK(m_metadata.id == previousMetadata.id);
+ m_metadata = previousMetadata;
+}
+
+
int64_t IDBObjectStore::findIndexId(const String& name) const
{
for (const auto& it : m_metadata.indexes) {

Powered by Google App Engine
This is Rietveld 408576698