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

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

Issue 2314933005: Align IndexedDB metadata rollback on transaction abort to spec. (Closed)
Patch Set: Addressed feedback. 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 00ce61b21b84732c5d0a24d14e7047fb41415bcc..924d2834b795018340e44bb4801a8ef52b6f40c5 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