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

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

Issue 2314933005: Align IndexedDB metadata rollback on transaction abort to spec. (Closed)
Patch Set: Rebased past the big reformat. 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
Index: third_party/WebKit/Source/modules/indexeddb/IDBOpenDBRequest.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBOpenDBRequest.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBOpenDBRequest.cpp
index 8a90c9022cd1c6a7fa443c963b272cc97dfe020d..4920f9c5e5e145e4455dd2515739cc9a1456afa0 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBOpenDBRequest.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBOpenDBRequest.cpp
@@ -108,11 +108,12 @@ void IDBOpenDBRequest::onUpgradeNeeded(int64_t oldVersion,
// This database hasn't had a version before.
oldVersion = IDBDatabaseMetadata::DefaultVersion;
}
- IDBDatabaseMetadata oldMetadata(metadata);
- oldMetadata.version = oldVersion;
+ IDBDatabaseMetadata oldDatabaseMetadata(
+ metadata.name, metadata.id, oldVersion, metadata.maxObjectStoreId);
m_transaction = IDBTransaction::createVersionChange(
- getScriptState(), m_transactionId, idbDatabase, this, oldMetadata);
+ getScriptState(), m_transactionId, idbDatabase, this,
+ oldDatabaseMetadata);
setResult(IDBAny::create(idbDatabase));
if (m_version == IDBDatabaseMetadata::NoVersion)

Powered by Google App Engine
This is Rietveld 408576698