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

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 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/IDBDatabase.h
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h
index ab0a9e2739b02fc6395eecfbd2963542d30c3618..1d1ca690adf3dbb400a552457599933732895b1b 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h
@@ -66,14 +66,10 @@ class MODULES_EXPORT IDBDatabase final : public EventTargetWithInlineData,
~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;
@@ -126,7 +122,9 @@ class MODULES_EXPORT IDBDatabase final : public EventTargetWithInlineData,
bool containsObjectStore(const String& name) const {
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