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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h

Issue 2314933005: Align IndexedDB metadata rollback on transaction abort to spec. (Closed)
Patch Set: Rebased. 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/IDBDatabase.h
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h
index 34711d9243cbaac43733b0cb3fdfaacefeaa53b3..33859a838232d8948e36d3644b9e0cb64e5aba64 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h
@@ -64,17 +64,15 @@ public:
~IDBDatabase() override;
DECLARE_VIRTUAL_TRACE();
- void setMetadata(const IDBDatabaseMetadata& metadata) { m_metadata = metadata; }
- void indexCreated(int64_t objectStoreId, const IDBIndexMetadata&);
- void indexDeleted(int64_t objectStoreId, int64_t indexId);
- void indexRenamed(int64_t objectStoreId, int64_t indexId, const String& newName);
+ void setMetadata(const IDBDatabaseMetadata&);
+ void setOwnMetadata(const IDBDatabaseOwnMetadata&);
void transactionCreated(IDBTransaction*);
void transactionFinished(const IDBTransaction*);
const String& getObjectStoreName(int64_t objectStoreId) const;
// Implement the IDL
- const String& name() const { return m_metadata.name; }
- unsigned long long version() const { return m_metadata.version; }
+ const String& name() const { return m_metadata.own.name; }
+ unsigned long long version() const { return m_metadata.own.version; }
DOMStringList* objectStoreNames() const;
IDBObjectStore* createObjectStore(const String& name, const IDBObjectStoreParameters& options, ExceptionState& exceptionState) { return createObjectStore(name, IDBKeyPath(options.keyPath()), options.autoIncrement(), exceptionState); }
@@ -112,7 +110,9 @@ public:
{
return findObjectStoreId(name) != IDBObjectStoreMetadata::InvalidId;
}
- void objectStoreRenamed(int64_t storeId, const String& newName);
+ void renameObjectStore(int64_t storeId, const String& newName);
+ void revertObjectStoreCreation(int64_t objectStoreId);
+ void revertObjectStoreMetadata(RefPtr<IDBObjectStoreMetadata> oldMetadata);
// Will return nullptr if this database is stopped.
WebIDBDatabase* backend() const { return m_backend.get(); }

Powered by Google App Engine
This is Rietveld 408576698