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

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 64d566a3b653f67506659fcfa8826216bf0a3d76..1a5e7b7cd521b972153caa4e6b630c2ffe88cabc 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h
@@ -64,10 +64,10 @@ 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);
+ // Overwrites the database metadata, including object store and index metadata.
+ void setMetadata(const IDBDatabaseMetadata&);
+ // Overwrites the database's own metadata, but does not change object store and index metadata.
+ void setDatabaseMetadata(const IDBDatabaseMetadata&);
void transactionCreated(IDBTransaction*);
void transactionFinished(const IDBTransaction*);
const String& getObjectStoreName(int64_t objectStoreId) const;
@@ -112,7 +112,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