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

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

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/IDBDatabase.h
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h
index 60de31259c04a37dc582dc89ed6b29e5fb9c651a..7cd1b8b251485845c05e596ae15446eadfc2d0f6 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h
@@ -66,14 +66,12 @@ 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.
jsbell 2016/10/06 20:01:31 Can you clarify in the comments why we need both o
pwnall 2016/10/06 22:15:22 Done.
+ 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 +124,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