Changeset 207641 in webkit
- Timestamp:
- Oct 20, 2016 4:03:21 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 53 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r207639 r207641 1 2016-10-20 Brady Eidson <beidson@apple.com> 2 3 IndexedDB 2.0: Support IDBObjectStore name assignment. 4 <rdar://problem/28806931> and https://bugs.webkit.org/show_bug.cgi?id=163749 5 6 Reviewed by Alex Christensen. 7 8 * storage/indexeddb/modern/objectstore-rename-1-expected.txt: Added. 9 * storage/indexeddb/modern/objectstore-rename-1-private-expected.txt: Added. 10 * storage/indexeddb/modern/objectstore-rename-1-private.html: Added. 11 * storage/indexeddb/modern/objectstore-rename-1.html: Added. 12 * storage/indexeddb/modern/resources/objectstore-rename-1.js: Added. 13 14 * storage/indexeddb/readonly-expected.txt: 15 * storage/indexeddb/readonly-private-expected.txt: 16 * storage/indexeddb/resources/readonly.js: Removed the test that verifies that object store names are 17 readonly as they are no longer readonly. 18 1 19 2016-10-20 Zalan Bujtas <zalan@apple.com> 2 20 -
trunk/LayoutTests/imported/w3c/ChangeLog
r207640 r207641 1 2016-10-20 Brady Eidson <beidson@apple.com> 2 3 IndexedDB 2.0: Support IDBObjectStore name assignment. 4 <rdar://problem/28806931> and https://bugs.webkit.org/show_bug.cgi?id=163749 5 6 Reviewed by Alex Christensen. 7 8 * web-platform-tests/IndexedDB/idbobjectstore-rename-errors-expected.txt: 9 * web-platform-tests/IndexedDB/idbobjectstore-rename-store-expected.txt: 10 1 11 2016-10-20 Chris Dumez <cdumez@apple.com> 2 12 -
trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-rename-errors-expected.txt
r206999 r207641 1 1 2 FAIL IndexedDB deleted object store rename throws assert_throws: function "() => store.name = 'renamed_books'" did not throw 3 FAIL IndexedDB object store rename throws in a readonly transaction assert_throws: function "() => store.name = 'renamed_books'" did not throw 4 FAIL IndexedDB object store rename throws in a readwrite transaction assert_throws: function "() => store.name = 'renamed_books'" did not throw 5 FAIL IndexedDB object store rename throws in an inactive transaction assert_throws: function "() => { bookStore.name = 'renamed_books'; }" did not throw 6 FAIL IndexedDB object store rename to the name of another store throws assert_throws: function "() => store.name = 'not_books'" did not throw 7 FAIL IndexedDB object store rename handles exceptions when stringifying names assert_throws: IDBObjectStore rename should re-raise toString() exception function "() => { 8 store.name = { 9 toSt..." did not throw 2 PASS IndexedDB deleted object store rename throws 3 PASS IndexedDB object store rename throws in a readonly transaction 4 PASS IndexedDB object store rename throws in a readwrite transaction 5 FAIL IndexedDB object store rename throws in an inactive transaction assert_throws: function "() => { bookStore.name = 'renamed_books'; }" threw object "InvalidStateError (DOM Exception 11): Failed set property..." that is not a DOMException TransactionInactiveError: property "code" is equal to 11, expected 0 6 FAIL IndexedDB object store rename to the name of another store throws assert_throws: function "() => store.name = 'not_books'" threw object "InvalidStateError (DOM Exception 11): Failed set property..." that is not a DOMException ConstraintError: property "code" is equal to 11, expected 0 7 PASS IndexedDB object store rename handles exceptions when stringifying names 10 8 -
trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore-rename-store-expected.txt
r206999 r207641 1 1 2 FAIL IndexedDB object store rename in new transaction assert_equals: IDBObjectStore name should change immediately after a rename expected "renamed_books" but got "books"3 FAIL IndexedDB object store rename in the transaction where it is created assert_equals: IDBObjectStore name should change immediately after a rename expected "renamed_books" but got "books"4 FAIL IndexedDB object store rename covers index promise_test: Unhandled rejection with value: object "NotFoundError (DOM IDBDatabase Exception 8): Failed to ex..." 5 FAIL IndexedDB object store rename covers key generator promise_test: Unhandled rejection with value: object "NotFoundError (DOM IDBDatabase Exception 8): Failed to ex..."2 FAIL IndexedDB object store rename in new transaction undefined is not an object (evaluating 'actual.length') 3 FAIL IndexedDB object store rename in the transaction where it is created undefined is not an object (evaluating 'actual.length') 4 PASS IndexedDB object store rename covers index 5 FAIL IndexedDB object store rename covers key generator assert_equals: Renaming an object store should not change the state of its key generator expected 345680 but got 345679 6 6 PASS IndexedDB object store rename to the same name succeeds 7 FAIL IndexedDB object store rename to the name of a deleted store succeeds assert_array_equals: IDBDatabase.objectStoreNames should immediately reflect the rename property 0, expected "not_books" but got "books" 8 FAIL IndexedDB object store swapping via renames succeeds Failed to execute 'objectStore' on 'IDBTransaction': The specified object store was not found. 9 FAIL IndexedDB object store rename stringifies non-string names assert_equals: IDBObjectStore name should change immediately after a rename to a number expected "42" but got "books" 10 FAIL IndexedDB object store can be renamed to "" assert_equals: IDBObjectStore name should change immediately after the rename expected "" but got "books" 11 FAIL IndexedDB object store can be renamed to "\u0000" assert_equals: IDBObjectStore name should change immediately after the rename expected "\0" but got "books" 12 FAIL IndexedDB object store can be renamed to "\uDC00\uD800" assert_equals: IDBObjectStore name should change immediately after the rename expected "í°í " but got "books" 7 PASS IndexedDB object store rename to the name of a deleted store succeeds 8 PASS IndexedDB object store swapping via renames succeeds 9 PASS IndexedDB object store rename stringifies non-string names 10 PASS IndexedDB object store can be renamed to "" 11 PASS IndexedDB object store can be renamed to "\u0000" 12 PASS IndexedDB object store can be renamed to "\uDC00\uD800" 13 13 -
trunk/LayoutTests/storage/indexeddb/readonly-expected.txt
r195181 r207641 17 17 Deleted all object stores. 18 18 objectStore = db.createObjectStore('foo'); 19 trying to set readonly property objectStore.name20 objectStore.name = 'bar'21 PASS objectStore.name is still foo22 19 trying to set readonly property objectStore.keyPath 23 20 objectStore.keyPath = 'bar' -
trunk/LayoutTests/storage/indexeddb/readonly-private-expected.txt
r195247 r207641 17 17 Deleted all object stores. 18 18 objectStore = db.createObjectStore('foo'); 19 trying to set readonly property objectStore.name20 objectStore.name = 'bar'21 PASS objectStore.name is still foo22 19 trying to set readonly property objectStore.keyPath 23 20 objectStore.keyPath = 'bar' -
trunk/LayoutTests/storage/indexeddb/resources/readonly.js
r163963 r207641 31 31 objectStore = evalAndLog("objectStore = db.createObjectStore('foo');"); 32 32 33 setReadonlyProperty("objectStore.name", "'bar'");34 33 setReadonlyProperty("objectStore.keyPath", "'bar'"); 35 34 /* fails, split into separate test -
trunk/Source/WebCore/ChangeLog
r207640 r207641 1 2016-10-20 Brady Eidson <beidson@apple.com> 2 3 IndexedDB 2.0: Support IDBObjectStore name assignment. 4 <rdar://problem/28806931> and https://bugs.webkit.org/show_bug.cgi?id=163749 5 6 Reviewed by Alex Christensen. 7 8 Tests: storage/indexeddb/modern/objectstore-rename-1-private.html 9 storage/indexeddb/modern/objectstore-rename-1.html 10 11 Touches a *lot* of code sites, but none of them are particularly interesting. 12 They are all just getting the new name spread out to all of the various objects that need it. 13 14 * Modules/indexeddb/IDBDatabase.cpp: 15 (WebCore::IDBDatabase::renameObjectStore): 16 * Modules/indexeddb/IDBDatabase.h: 17 18 * Modules/indexeddb/IDBObjectStore.cpp: 19 (WebCore::IDBObjectStore::setName): 20 * Modules/indexeddb/IDBObjectStore.h: 21 * Modules/indexeddb/IDBObjectStore.idl: 22 23 * Modules/indexeddb/IDBTransaction.cpp: 24 (WebCore::IDBTransaction::renameObjectStore): 25 (WebCore::IDBTransaction::renameObjectStoreOnServer): 26 (WebCore::IDBTransaction::didRenameObjectStoreOnServer): 27 * Modules/indexeddb/IDBTransaction.h: 28 29 * Modules/indexeddb/client/IDBConnectionProxy.cpp: 30 (WebCore::IDBClient::IDBConnectionProxy::renameObjectStore): 31 * Modules/indexeddb/client/IDBConnectionProxy.h: 32 33 * Modules/indexeddb/client/IDBConnectionToServer.cpp: 34 (WebCore::IDBClient::IDBConnectionToServer::renameObjectStore): 35 (WebCore::IDBClient::IDBConnectionToServer::didRenameObjectStore): 36 * Modules/indexeddb/client/IDBConnectionToServer.h: 37 * Modules/indexeddb/client/IDBConnectionToServerDelegate.h: 38 39 * Modules/indexeddb/server/IDBBackingStore.h: 40 41 * Modules/indexeddb/server/IDBConnectionToClient.cpp: 42 (WebCore::IDBServer::IDBConnectionToClient::didDeleteObjectStore): 43 (WebCore::IDBServer::IDBConnectionToClient::didRenameObjectStore): 44 * Modules/indexeddb/server/IDBConnectionToClient.h: 45 * Modules/indexeddb/server/IDBConnectionToClientDelegate.h: 46 47 * Modules/indexeddb/server/IDBServer.cpp: 48 (WebCore::IDBServer::IDBServer::renameObjectStore): 49 * Modules/indexeddb/server/IDBServer.h: 50 51 * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp: 52 (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreRenamed): 53 (WebCore::IDBServer::MemoryBackingStoreTransaction::abort): 54 * Modules/indexeddb/server/MemoryBackingStoreTransaction.h: 55 56 * Modules/indexeddb/server/MemoryIDBBackingStore.cpp: 57 (WebCore::IDBServer::MemoryIDBBackingStore::renameObjectStore): 58 * Modules/indexeddb/server/MemoryIDBBackingStore.h: 59 60 * Modules/indexeddb/server/MemoryObjectStore.h: 61 (WebCore::IDBServer::MemoryObjectStore::rename): 62 63 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: 64 (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore): 65 * Modules/indexeddb/server/SQLiteIDBBackingStore.h: 66 67 * Modules/indexeddb/server/UniqueIDBDatabase.cpp: 68 (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore): 69 (WebCore::IDBServer::UniqueIDBDatabase::performRenameObjectStore): 70 (WebCore::IDBServer::UniqueIDBDatabase::didPerformRenameObjectStore): 71 * Modules/indexeddb/server/UniqueIDBDatabase.h: 72 73 * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp: 74 (WebCore::IDBServer::UniqueIDBDatabaseConnection::didRenameObjectStore): 75 * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h: 76 77 * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp: 78 (WebCore::IDBServer::UniqueIDBDatabaseTransaction::renameObjectStore): 79 * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h: 80 81 * Modules/indexeddb/shared/IDBDatabaseInfo.cpp: 82 (WebCore::IDBDatabaseInfo::renameObjectStore): 83 * Modules/indexeddb/shared/IDBDatabaseInfo.h: 84 85 * Modules/indexeddb/shared/IDBObjectStoreInfo.h: 86 (WebCore::IDBObjectStoreInfo::rename): 87 88 * Modules/indexeddb/shared/IDBResultData.cpp: 89 (WebCore::IDBResultData::renameObjectStoreSuccess): 90 * Modules/indexeddb/shared/IDBResultData.h: 91 92 * Modules/indexeddb/shared/InProcessIDBServer.cpp: 93 (WebCore::InProcessIDBServer::didRenameObjectStore): 94 (WebCore::InProcessIDBServer::renameObjectStore): 95 * Modules/indexeddb/shared/InProcessIDBServer.h: 96 1 97 2016-10-20 Chris Dumez <cdumez@apple.com> 2 98 -
trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp
r206976 r207641 107 107 } 108 108 109 void IDBDatabase::renameObjectStore(IDBObjectStore& objectStore, const String& newName) 110 { 111 ASSERT(currentThread() == originThreadID()); 112 ASSERT(m_versionChangeTransaction); 113 ASSERT(m_info.hasObjectStore(objectStore.info().name())); 114 115 m_info.renameObjectStore(objectStore.info().identifier(), newName); 116 117 m_versionChangeTransaction->renameObjectStore(objectStore, newName); 118 } 119 109 120 ExceptionOr<Ref<IDBObjectStore>> IDBDatabase::createObjectStore(const String&, const Dictionary&) 110 121 { -
trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h
r206976 r207641 63 63 void close(); 64 64 65 void renameObjectStore(IDBObjectStore&, const String& newName); 66 65 67 // EventTarget 66 68 EventTargetInterface eventTargetInterface() const final { return IDBDatabaseEventTargetInterfaceType; } -
trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp
r207505 r207641 96 96 } 97 97 98 ExceptionOr<void> IDBObjectStore::setName(const String& name) 99 { 100 ASSERT(currentThread() == m_transaction->database().originThreadID()); 101 102 if (m_deleted) 103 return Exception { INVALID_STATE_ERR, ASCIILiteral("Failed set property 'name' on 'IDBObjectStore': The object store has been deleted.") }; 104 105 if (!m_transaction->isVersionChange()) 106 return Exception { INVALID_STATE_ERR, ASCIILiteral("Failed set property 'name' on 'IDBObjectStore': The object store's transaction is not a version change transaction.") }; 107 108 if (!m_transaction->isActive()) 109 return Exception { INVALID_STATE_ERR, ASCIILiteral("Failed set property 'name' on 'IDBObjectStore': The object store's transaction is not active.") }; 110 111 if (m_info.name() == name) 112 return { }; 113 114 if (m_transaction->database().info().hasObjectStore(name)) 115 return Exception { INVALID_STATE_ERR, makeString("Failed set property 'name' on 'IDBObjectStore': The database already has an object store named '", name, "'.") }; 116 117 m_transaction->database().renameObjectStore(*this, name); 118 m_info.rename(name); 119 120 return { }; 121 } 122 98 123 const IDBKeyPath& IDBObjectStore::keyPath() const 99 124 { -
trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h
r206976 r207641 61 61 62 62 const String& name() const; 63 ExceptionOr<void> setName(const String&); 63 64 const IDBKeyPath& keyPath() const; 64 65 RefPtr<DOMStringList> indexNames() const; -
trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl
r206976 r207641 31 31 SkipVTableValidation, 32 32 ] interface IDBObjectStore { 33 readonly attribute DOMString?name;33 [SetterMayThrowException] attribute DOMString name; 34 34 [ImplementationReturnType=IDBKeyPath] readonly attribute any keyPath; 35 35 readonly attribute DOMStringList indexNames; -
trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
r206976 r207641 602 602 } 603 603 604 void IDBTransaction::renameObjectStore(IDBObjectStore& objectStore, const String& newName) 605 { 606 LOG(IndexedDB, "IDBTransaction::renameObjectStore"); 607 ASSERT(isVersionChange()); 608 ASSERT(scriptExecutionContext()); 609 ASSERT(currentThread() == m_database->originThreadID()); 610 611 ASSERT(m_referencedObjectStores.contains(objectStore.info().name())); 612 ASSERT(!m_referencedObjectStores.contains(newName)); 613 ASSERT(m_referencedObjectStores.get(objectStore.info().name()) == &objectStore); 614 615 uint64_t objectStoreIdentifier = objectStore.info().identifier(); 616 auto operation = IDBClient::createTransactionOperation(*this, &IDBTransaction::didRenameObjectStoreOnServer, &IDBTransaction::renameObjectStoreOnServer, objectStoreIdentifier, newName); 617 scheduleOperation(WTFMove(operation)); 618 619 m_referencedObjectStores.set(newName, m_referencedObjectStores.take(objectStore.info().name())); 620 } 621 622 void IDBTransaction::renameObjectStoreOnServer(IDBClient::TransactionOperation& operation, const uint64_t& objectStoreIdentifier, const String& newName) 623 { 624 LOG(IndexedDB, "IDBTransaction::renameObjectStoreOnServer"); 625 ASSERT(currentThread() == m_database->originThreadID()); 626 ASSERT(isVersionChange()); 627 628 m_database->connectionProxy().renameObjectStore(operation, objectStoreIdentifier, newName); 629 } 630 631 void IDBTransaction::didRenameObjectStoreOnServer(const IDBResultData& resultData) 632 { 633 LOG(IndexedDB, "IDBTransaction::didRenameObjectStoreOnServer"); 634 ASSERT(currentThread() == m_database->originThreadID()); 635 ASSERT_UNUSED(resultData, resultData.type() == IDBResultType::RenameObjectStoreSuccess || resultData.type() == IDBResultType::Error); 636 } 637 604 638 std::unique_ptr<IDBIndex> IDBTransaction::createIndex(IDBObjectStore& objectStore, const IDBIndexInfo& info) 605 639 { -
trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h
r206976 r207641 114 114 115 115 Ref<IDBObjectStore> createObjectStore(const IDBObjectStoreInfo&); 116 void renameObjectStore(IDBObjectStore&, const String& newName); 116 117 std::unique_ptr<IDBIndex> createIndex(IDBObjectStore&, const IDBIndexInfo&); 117 118 … … 172 173 void didCreateObjectStoreOnServer(const IDBResultData&); 173 174 175 void renameObjectStoreOnServer(IDBClient::TransactionOperation&, const uint64_t& objectStoreIdentifier, const String& newName); 176 void didRenameObjectStoreOnServer(const IDBResultData&); 177 174 178 void createIndexOnServer(IDBClient::TransactionOperation&, const IDBIndexInfo&); 175 179 void didCreateIndexOnServer(const IDBResultData&); -
trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp
r206976 r207641 126 126 } 127 127 128 void IDBConnectionProxy::renameObjectStore(TransactionOperation& operation, uint64_t objectStoreIdentifier, const String& newName) 129 { 130 const IDBRequestData requestData(operation); 131 saveOperation(operation); 132 133 callConnectionOnMainThread(&IDBConnectionToServer::renameObjectStore, requestData, objectStoreIdentifier, newName); 134 } 135 128 136 void IDBConnectionProxy::deleteObjectStore(TransactionOperation& operation, const String& objectStoreName) 129 137 { -
trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h
r206976 r207641 78 78 void openCursor(TransactionOperation&, const IDBCursorInfo&); 79 79 void iterateCursor(TransactionOperation&, const IDBKeyData&, unsigned long count); 80 80 void renameObjectStore(TransactionOperation&, uint64_t objectStoreIdentifier, const String& newName); 81 81 82 void fireVersionChangeEvent(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier& requestIdentifier, uint64_t requestedVersion); 82 83 void didFireVersionChangeEvent(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier& requestIdentifier); -
trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp
r204018 r207641 117 117 } 118 118 119 void IDBConnectionToServer::renameObjectStore(const IDBRequestData& requestData, uint64_t objectStoreIdentifier, const String& newName) 120 { 121 LOG(IndexedDB, "IDBConnectionToServer::renameObjectStore"); 122 ASSERT(isMainThread()); 123 124 m_delegate->renameObjectStore(requestData, objectStoreIdentifier, newName); 125 } 126 127 void IDBConnectionToServer::didRenameObjectStore(const IDBResultData& resultData) 128 { 129 LOG(IndexedDB, "IDBConnectionToServer::didRenameObjectStore"); 130 m_proxy->completeOperation(resultData); 131 } 132 119 133 void IDBConnectionToServer::clearObjectStore(const IDBRequestData& requestData, uint64_t objectStoreIdentifier) 120 134 { -
trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h
r204466 r207641 68 68 void deleteObjectStore(const IDBRequestData&, const String& objectStoreName); 69 69 WEBCORE_EXPORT void didDeleteObjectStore(const IDBResultData&); 70 71 void renameObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier, const String& newName); 72 WEBCORE_EXPORT void didRenameObjectStore(const IDBResultData&); 70 73 71 74 void clearObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier); -
trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h
r204018 r207641 64 64 virtual void createObjectStore(const IDBRequestData&, const IDBObjectStoreInfo&) = 0; 65 65 virtual void deleteObjectStore(const IDBRequestData&, const String& objectStoreName) = 0; 66 virtual void renameObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier, const String& newName) = 0; 66 67 virtual void clearObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier) = 0; 67 68 virtual void createIndex(const IDBRequestData&, const IDBIndexInfo&) = 0; -
trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h
r199250 r207641 71 71 virtual IDBError createObjectStore(const IDBResourceIdentifier& transactionIdentifier, const IDBObjectStoreInfo&) = 0; 72 72 virtual IDBError deleteObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) = 0; 73 virtual IDBError renameObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& newName) = 0; 73 74 virtual IDBError clearObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) = 0; 74 75 virtual IDBError createIndex(const IDBResourceIdentifier& transactionIdentifier, const IDBIndexInfo&) = 0; -
trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp
r202359 r207641 72 72 { 73 73 m_delegate->didDeleteObjectStore(result); 74 } 75 76 void IDBConnectionToClient::didRenameObjectStore(const IDBResultData& result) 77 { 78 m_delegate->didRenameObjectStore(result); 74 79 } 75 80 -
trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h
r202359 r207641 56 56 void didCreateObjectStore(const IDBResultData&); 57 57 void didDeleteObjectStore(const IDBResultData&); 58 void didRenameObjectStore(const IDBResultData&); 58 59 void didClearObjectStore(const IDBResultData&); 59 60 void didCreateIndex(const IDBResultData&); -
trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h
r201098 r207641 54 54 virtual void didCreateObjectStore(const IDBResultData&) = 0; 55 55 virtual void didDeleteObjectStore(const IDBResultData&) = 0; 56 virtual void didRenameObjectStore(const IDBResultData&) = 0; 56 57 virtual void didClearObjectStore(const IDBResultData&) = 0; 57 58 virtual void didCreateIndex(const IDBResultData&) = 0; -
trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp
r204041 r207641 214 214 } 215 215 216 void IDBServer::renameObjectStore(const IDBRequestData& requestData, uint64_t objectStoreIdentifier, const String& newName) 217 { 218 LOG(IndexedDB, "IDBServer::renameObjectStore"); 219 220 auto transaction = m_transactions.get(requestData.transactionIdentifier()); 221 if (!transaction) 222 return; 223 224 ASSERT(transaction->isVersionChange()); 225 transaction->renameObjectStore(requestData, objectStoreIdentifier, newName); 226 } 227 216 228 void IDBServer::clearObjectStore(const IDBRequestData& requestData, uint64_t objectStoreIdentifier) 217 229 { -
trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h
r204466 r207641 67 67 WEBCORE_EXPORT void didFinishHandlingVersionChangeTransaction(uint64_t databaseConnectionIdentifier, const IDBResourceIdentifier&); 68 68 WEBCORE_EXPORT void createObjectStore(const IDBRequestData&, const IDBObjectStoreInfo&); 69 WEBCORE_EXPORT void renameObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier, const String& newName); 69 70 WEBCORE_EXPORT void deleteObjectStore(const IDBRequestData&, const String& objectStoreName); 70 71 WEBCORE_EXPORT void clearObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier); -
trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp
r199250 r207641 151 151 } 152 152 153 void MemoryBackingStoreTransaction::objectStoreRenamed(MemoryObjectStore& objectStore, const String& oldName) 154 { 155 ASSERT(m_objectStores.contains(&objectStore)); 156 ASSERT(m_info.mode() == IndexedDB::TransactionMode::VersionChange); 157 158 // We only care about the first rename in a given transaction, because if the transaction is aborted we want 159 // to go back to the first 'oldName' 160 m_originalObjectStoreNames.add(&objectStore, oldName); 161 } 162 153 163 void MemoryBackingStoreTransaction::indexCleared(MemoryIndex& index, std::unique_ptr<IndexValueStore>&& valueStore) 154 164 { … … 193 203 194 204 TemporaryChange<bool> change(m_isAborting, true); 205 206 for (auto iterator : m_originalObjectStoreNames) 207 iterator.key->rename(iterator.value); 208 m_originalObjectStoreNames.clear(); 195 209 196 210 for (auto objectStore : m_versionChangeAddedObjectStores) -
trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.h
r200036 r207641 65 65 void objectStoreDeleted(Ref<MemoryObjectStore>&&); 66 66 void objectStoreCleared(MemoryObjectStore&, std::unique_ptr<KeyValueMap>&&, std::unique_ptr<std::set<IDBKeyData>>&&); 67 void objectStoreRenamed(MemoryObjectStore&, const String& oldName); 67 68 void indexCleared(MemoryIndex&, std::unique_ptr<IndexValueStore>&&); 68 69 … … 96 97 HashMap<MemoryObjectStore*, std::unique_ptr<KeyValueMap>> m_clearedKeyValueMaps; 97 98 HashMap<MemoryObjectStore*, std::unique_ptr<std::set<IDBKeyData>>> m_clearedOrderedKeys; 99 HashMap<MemoryObjectStore*, String> m_originalObjectStoreNames; 98 100 HashMap<MemoryIndex*, std::unique_ptr<IndexValueStore>> m_clearedIndexValueStores; 99 101 }; -
trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp
r202806 r207641 172 172 } 173 173 174 IDBError MemoryIDBBackingStore::renameObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& newName) 175 { 176 LOG(IndexedDB, "MemoryIDBBackingStore::renameObjectStore"); 177 178 ASSERT(m_databaseInfo); 179 if (!m_databaseInfo->infoForExistingObjectStore(objectStoreIdentifier)) 180 return IDBError(IDBDatabaseException::ConstraintError); 181 182 auto transaction = m_transactions.get(transactionIdentifier); 183 ASSERT(transaction); 184 ASSERT(transaction->isVersionChange()); 185 186 auto objectStore = m_objectStoresByIdentifier.get(objectStoreIdentifier); 187 ASSERT(objectStore); 188 if (!objectStore) 189 return IDBError(IDBDatabaseException::ConstraintError); 190 191 String oldName = objectStore->info().name(); 192 objectStore->rename(newName); 193 transaction->objectStoreRenamed(*objectStore, oldName); 194 195 m_databaseInfo->renameObjectStore(objectStoreIdentifier, newName); 196 197 return IDBError(); 198 } 199 174 200 IDBError MemoryIDBBackingStore::clearObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) 175 201 { -
trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h
r200036 r207641 55 55 IDBError createObjectStore(const IDBResourceIdentifier& transactionIdentifier, const IDBObjectStoreInfo&) final; 56 56 IDBError deleteObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) final; 57 IDBError renameObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& newName) final; 57 58 IDBError clearObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) final; 58 59 IDBError createIndex(const IDBResourceIdentifier& transactionIdentifier, const IDBIndexInfo&) final; -
trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h
r199668 r207641 98 98 void maybeRestoreDeletedIndex(Ref<MemoryIndex>&&); 99 99 100 void rename(const String& newName) { m_info.rename(newName); } 101 100 102 private: 101 103 MemoryObjectStore(const IDBObjectStoreInfo&); -
trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp
r205462 r207641 979 979 } 980 980 981 IDBError SQLiteIDBBackingStore::renameObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& newName) 982 { 983 LOG(IndexedDB, "SQLiteIDBBackingStore::renameObjectStore - object store %" PRIu64, objectStoreIdentifier); 984 985 ASSERT(m_sqliteDB); 986 ASSERT(m_sqliteDB->isOpen()); 987 988 auto* transaction = m_transactions.get(transactionIdentifier); 989 if (!transaction || !transaction->inProgress()) { 990 LOG_ERROR("Attempt to rename an object store without an in-progress transaction"); 991 return { IDBDatabaseException::UnknownError, ASCIILiteral("Attempt to rename an object store without an in-progress transaction") }; 992 } 993 if (transaction->mode() != IndexedDB::TransactionMode::VersionChange) { 994 LOG_ERROR("Attempt to rename an object store in a non-version-change transaction"); 995 return { IDBDatabaseException::UnknownError, ASCIILiteral("Attempt to rename an object store in a non-version-change transaction") }; 996 } 997 998 { 999 SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("UPDATE ObjectStoreInfo SET name = ? WHERE id = ?;")); 1000 if (sql.prepare() != SQLITE_OK 1001 || sql.bindText(1, newName) != SQLITE_OK 1002 || sql.bindInt64(2, objectStoreIdentifier) != SQLITE_OK 1003 || sql.step() != SQLITE_DONE) { 1004 LOG_ERROR("Could not update name for object store id %" PRIi64 " in ObjectStoreInfo table (%i) - %s", objectStoreIdentifier, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); 1005 return { IDBDatabaseException::UnknownError, ASCIILiteral("Could not rename object store") }; 1006 } 1007 } 1008 1009 m_databaseInfo->renameObjectStore(objectStoreIdentifier, newName); 1010 1011 return { }; 1012 } 1013 981 1014 IDBError SQLiteIDBBackingStore::clearObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreID) 982 1015 { -
trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h
r200163 r207641 59 59 IDBError createObjectStore(const IDBResourceIdentifier& transactionIdentifier, const IDBObjectStoreInfo&) final; 60 60 IDBError deleteObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) final; 61 IDBError renameObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& newName) final; 61 62 IDBError clearObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) final; 62 63 IDBError createIndex(const IDBResourceIdentifier& transactionIdentifier, const IDBIndexInfo&) final; -
trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp
r207505 r207641 661 661 } 662 662 663 void UniqueIDBDatabase::renameObjectStore(UniqueIDBDatabaseTransaction& transaction, uint64_t objectStoreIdentifier, const String& newName, ErrorCallback callback) 664 { 665 ASSERT(isMainThread()); 666 LOG(IndexedDB, "(main) UniqueIDBDatabase::renameObjectStore"); 667 668 uint64_t callbackID = storeCallbackOrFireError(callback); 669 if (!callbackID) 670 return; 671 672 auto* info = m_databaseInfo->infoForExistingObjectStore(objectStoreIdentifier); 673 if (!info) { 674 performErrorCallback(callbackID, { IDBDatabaseException::UnknownError, ASCIILiteral("Attempt to rename non-existant object store") }); 675 return; 676 } 677 678 postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::performRenameObjectStore, callbackID, transaction.info().identifier(), objectStoreIdentifier, newName)); 679 } 680 681 void UniqueIDBDatabase::performRenameObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& newName) 682 { 683 ASSERT(!isMainThread()); 684 LOG(IndexedDB, "(db) UniqueIDBDatabase::performRenameObjectStore"); 685 686 ASSERT(m_backingStore); 687 m_backingStore->renameObjectStore(transactionIdentifier, objectStoreIdentifier, newName); 688 689 IDBError error; 690 postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformRenameObjectStore, callbackIdentifier, error, objectStoreIdentifier, newName)); 691 } 692 693 void UniqueIDBDatabase::didPerformRenameObjectStore(uint64_t callbackIdentifier, const IDBError& error, uint64_t objectStoreIdentifier, const String& newName) 694 { 695 ASSERT(isMainThread()); 696 LOG(IndexedDB, "(main) UniqueIDBDatabase::didPerformRenameObjectStore"); 697 698 if (error.isNull()) 699 m_databaseInfo->renameObjectStore(objectStoreIdentifier, newName); 700 701 performErrorCallback(callbackIdentifier, error); 702 } 703 663 704 void UniqueIDBDatabase::clearObjectStore(UniqueIDBDatabaseTransaction& transaction, uint64_t objectStoreIdentifier, ErrorCallback callback) 664 705 { -
trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h
r204466 r207641 88 88 void createObjectStore(UniqueIDBDatabaseTransaction&, const IDBObjectStoreInfo&, ErrorCallback); 89 89 void deleteObjectStore(UniqueIDBDatabaseTransaction&, const String& objectStoreName, ErrorCallback); 90 void renameObjectStore(UniqueIDBDatabaseTransaction&, uint64_t objectStoreIdentifier, const String& newName, ErrorCallback); 90 91 void clearObjectStore(UniqueIDBDatabaseTransaction&, uint64_t objectStoreIdentifier, ErrorCallback); 91 92 void createIndex(UniqueIDBDatabaseTransaction&, const IDBIndexInfo&, ErrorCallback); … … 145 146 void performCreateObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, const IDBObjectStoreInfo&); 146 147 void performDeleteObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier); 148 void performRenameObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& newName); 147 149 void performClearObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier); 148 150 void performCreateIndex(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, const IDBIndexInfo&); … … 163 165 void didPerformCreateObjectStore(uint64_t callbackIdentifier, const IDBError&, const IDBObjectStoreInfo&); 164 166 void didPerformDeleteObjectStore(uint64_t callbackIdentifier, const IDBError&, uint64_t objectStoreIdentifier); 167 void didPerformRenameObjectStore(uint64_t callbackIdentifier, const IDBError&, uint64_t objectStoreIdentifier, const String& newName); 165 168 void didPerformClearObjectStore(uint64_t callbackIdentifier, const IDBError&); 166 169 void didPerformCreateIndex(uint64_t callbackIdentifier, const IDBError&, const IDBIndexInfo&); -
trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp
r203241 r207641 185 185 } 186 186 187 void UniqueIDBDatabaseConnection::didRenameObjectStore(const IDBResultData& resultData) 188 { 189 LOG(IndexedDB, "UniqueIDBDatabaseConnection::didRenameObjectStore"); 190 191 m_connectionToClient.didRenameObjectStore(resultData); 192 } 193 187 194 void UniqueIDBDatabaseConnection::didClearObjectStore(const IDBResultData& resultData) 188 195 { -
trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h
r201098 r207641 70 70 void didCreateObjectStore(const IDBResultData&); 71 71 void didDeleteObjectStore(const IDBResultData&); 72 void didRenameObjectStore(const IDBResultData&); 72 73 void didClearObjectStore(const IDBResultData&); 73 74 void didCreateIndex(const IDBResultData&); -
trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp
r204018 r207641 138 138 } 139 139 140 void UniqueIDBDatabaseTransaction::renameObjectStore(const IDBRequestData& requestData, uint64_t objectStoreIdentifier, const String& newName) 141 { 142 LOG(IndexedDB, "UniqueIDBDatabaseTransaction::renameObjectStore"); 143 144 ASSERT(isVersionChange()); 145 ASSERT(m_transactionInfo.identifier() == requestData.transactionIdentifier()); 146 147 RefPtr<UniqueIDBDatabaseTransaction> protectedThis(this); 148 m_databaseConnection->database().renameObjectStore(*this, objectStoreIdentifier, newName, [this, protectedThis, requestData](const IDBError& error) { 149 LOG(IndexedDB, "UniqueIDBDatabaseTransaction::renameObjectStore (callback)"); 150 if (error.isNull()) 151 m_databaseConnection->didRenameObjectStore(IDBResultData::renameObjectStoreSuccess(requestData.requestIdentifier())); 152 else 153 m_databaseConnection->didRenameObjectStore(IDBResultData::error(requestData.requestIdentifier(), error)); 154 }); 155 } 156 140 157 void UniqueIDBDatabaseTransaction::clearObjectStore(const IDBRequestData& requestData, uint64_t objectStoreIdentifier) 141 158 { -
trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h
r204018 r207641 70 70 void createObjectStore(const IDBRequestData&, const IDBObjectStoreInfo&); 71 71 void deleteObjectStore(const IDBRequestData&, const String& objectStoreName); 72 void renameObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier, const String& newName); 72 73 void clearObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier); 73 74 void createIndex(const IDBRequestData&, const IDBIndexInfo&); -
trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp
r204394 r207641 123 123 } 124 124 125 void IDBDatabaseInfo::renameObjectStore(uint64_t objectStoreIdentifier, const String& newName) 126 { 127 auto* info = infoForExistingObjectStore(objectStoreIdentifier); 128 if (!info) 129 return; 130 131 info->rename(newName); 132 } 133 125 134 Vector<String> IDBDatabaseInfo::objectStoreNames() const 126 135 { -
trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h
r202806 r207641 58 58 const IDBObjectStoreInfo* infoForExistingObjectStore(const String& objectStoreName) const; 59 59 60 void renameObjectStore(uint64_t objectStoreIdentifier, const String& newName); 61 60 62 Vector<String> objectStoreNames() const; 61 63 -
trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.h
r202806 r207641 48 48 bool autoIncrement() const { return m_autoIncrement; } 49 49 uint64_t maxIndexID() const { return m_maxIndexID; } 50 51 void rename(const String& newName) { m_name = newName; } 50 52 51 53 IDBObjectStoreInfo isolatedCopy() const; -
trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.cpp
r200484 r207641 140 140 } 141 141 142 IDBResultData IDBResultData::renameObjectStoreSuccess(const IDBResourceIdentifier& requestIdentifier) 143 { 144 return { IDBResultType::RenameObjectStoreSuccess, requestIdentifier }; 145 } 146 142 147 IDBResultData IDBResultData::clearObjectStoreSuccess(const IDBResourceIdentifier& requestIdentifier) 143 148 { -
trunk/Source/WebCore/Modules/indexeddb/shared/IDBResultData.h
r200484 r207641 58 58 OpenCursorSuccess, 59 59 IterateCursorSuccess, 60 RenameObjectStoreSuccess, 60 61 }; 61 62 … … 73 74 static IDBResultData createObjectStoreSuccess(const IDBResourceIdentifier&); 74 75 static IDBResultData deleteObjectStoreSuccess(const IDBResourceIdentifier&); 76 static IDBResultData renameObjectStoreSuccess(const IDBResourceIdentifier&); 75 77 static IDBResultData clearObjectStoreSuccess(const IDBResourceIdentifier&); 76 78 static IDBResultData createIndexSuccess(const IDBResourceIdentifier&); -
trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp
r204018 r207641 147 147 } 148 148 149 void InProcessIDBServer::didRenameObjectStore(const IDBResultData& resultData) 150 { 151 RunLoop::current().dispatch([this, protectedThis = makeRef(*this), resultData] { 152 m_connectionToServer->didRenameObjectStore(resultData); 153 }); 154 } 155 149 156 void InProcessIDBServer::didClearObjectStore(const IDBResultData& resultData) 150 157 { … … 245 252 } 246 253 254 void InProcessIDBServer::renameObjectStore(const IDBRequestData& requestData, uint64_t objectStoreIdentifier, const String& newName) 255 { 256 RunLoop::current().dispatch([this, protectedThis = makeRef(*this), requestData, objectStoreIdentifier, newName] { 257 m_server->renameObjectStore(requestData, objectStoreIdentifier, newName); 258 }); 259 } 260 247 261 void InProcessIDBServer::clearObjectStore(const IDBRequestData& requestData, uint64_t objectStoreIdentifier) 248 262 { -
trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h
r204018 r207641 65 65 void createObjectStore(const IDBRequestData&, const IDBObjectStoreInfo&) final; 66 66 void deleteObjectStore(const IDBRequestData&, const String& objectStoreName) final; 67 void renameObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier, const String& newName) final; 67 68 void clearObjectStore(const IDBRequestData&, uint64_t objectStoreIdentifier) final; 68 69 void createIndex(const IDBRequestData&, const IDBIndexInfo&) final; … … 90 91 void didCreateObjectStore(const IDBResultData&) final; 91 92 void didDeleteObjectStore(const IDBResultData&) final; 93 void didRenameObjectStore(const IDBResultData&) final; 92 94 void didClearObjectStore(const IDBResultData&) final; 93 95 void didCreateIndex(const IDBResultData&) final; -
trunk/Source/WebKit2/ChangeLog
r207614 r207641 1 2016-10-20 Brady Eidson <beidson@apple.com> 2 3 IndexedDB 2.0: Support IDBObjectStore name assignment. 4 <rdar://problem/28806931> and https://bugs.webkit.org/show_bug.cgi?id=163749 5 6 Reviewed by Alex Christensen. 7 8 * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp: 9 (WebKit::WebIDBConnectionToClient::didRenameObjectStore): 10 (WebKit::WebIDBConnectionToClient::renameObjectStore): 11 * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h: 12 * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in: 13 14 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp: 15 (WebKit::WebIDBConnectionToServer::renameObjectStore): 16 (WebKit::WebIDBConnectionToServer::didRenameObjectStore): 17 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h: 18 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in: 19 1 20 2016-10-20 Carlos Garcia Campos <cgarcia@igalia.com> 2 21 -
trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp
r204018 r207641 108 108 } 109 109 110 void WebIDBConnectionToClient::didRenameObjectStore(const WebCore::IDBResultData& resultData) 111 { 112 send(Messages::WebIDBConnectionToServer::DidRenameObjectStore(resultData)); 113 } 114 110 115 void WebIDBConnectionToClient::didClearObjectStore(const WebCore::IDBResultData& resultData) 111 116 { … … 236 241 } 237 242 243 void WebIDBConnectionToClient::renameObjectStore(const IDBRequestData& request, uint64_t objectStoreIdentifier, const String& newName) 244 { 245 DatabaseProcess::singleton().idbServer().renameObjectStore(request, objectStoreIdentifier, newName); 246 } 247 238 248 void WebIDBConnectionToClient::clearObjectStore(const IDBRequestData& request, uint64_t objectStoreIdentifier) 239 249 { -
trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h
r204668 r207641 65 65 void didCreateObjectStore(const WebCore::IDBResultData&) final; 66 66 void didDeleteObjectStore(const WebCore::IDBResultData&) final; 67 void didRenameObjectStore(const WebCore::IDBResultData&) final; 67 68 void didClearObjectStore(const WebCore::IDBResultData&) final; 68 69 void didCreateIndex(const WebCore::IDBResultData&) final; … … 93 94 void createObjectStore(const WebCore::IDBRequestData&, const WebCore::IDBObjectStoreInfo&); 94 95 void deleteObjectStore(const WebCore::IDBRequestData&, const String& objectStoreName); 96 void renameObjectStore(const WebCore::IDBRequestData&, uint64_t objectStoreIdentifier, const String& newName); 95 97 void clearObjectStore(const WebCore::IDBRequestData&, uint64_t objectStoreIdentifier); 96 98 void createIndex(const WebCore::IDBRequestData&, const WebCore::IDBIndexInfo&); -
trunk/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in
r204018 r207641 31 31 CreateObjectStore(WebCore::IDBRequestData requestData, WebCore::IDBObjectStoreInfo info); 32 32 DeleteObjectStore(WebCore::IDBRequestData requestData, String objectStoreName); 33 RenameObjectStore(WebCore::IDBRequestData requestData, uint64_t objectStoreIdentifier, String newName); 33 34 ClearObjectStore(WebCore::IDBRequestData requestData, uint64_t objectStoreIdentifier); 34 35 CreateIndex(WebCore::IDBRequestData requestData, WebCore::IDBIndexInfo info); -
trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp
r204772 r207641 119 119 } 120 120 121 void WebIDBConnectionToServer::renameObjectStore(const IDBRequestData& requestData, uint64_t objectStoreIdentifier, const String& newName) 122 { 123 send(Messages::WebIDBConnectionToClient::RenameObjectStore(requestData, objectStoreIdentifier, newName)); 124 } 125 121 126 void WebIDBConnectionToServer::clearObjectStore(const IDBRequestData& requestData, uint64_t objectStoreIdentifier) 122 127 { … … 227 232 { 228 233 m_connectionToServer->didDeleteObjectStore(result); 234 } 235 236 void WebIDBConnectionToServer::didRenameObjectStore(const IDBResultData& result) 237 { 238 m_connectionToServer->didRenameObjectStore(result); 229 239 } 230 240 -
trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h
r204668 r207641 54 54 void createObjectStore(const WebCore::IDBRequestData&, const WebCore::IDBObjectStoreInfo&) final; 55 55 void deleteObjectStore(const WebCore::IDBRequestData&, const String& objectStoreName) final; 56 void renameObjectStore(const WebCore::IDBRequestData&, uint64_t objectStoreIdentifier, const String& newName) final; 56 57 void clearObjectStore(const WebCore::IDBRequestData&, uint64_t objectStoreIdentifier) final; 57 58 void createIndex(const WebCore::IDBRequestData&, const WebCore::IDBIndexInfo&) final; … … 82 83 void didCreateObjectStore(const WebCore::IDBResultData&); 83 84 void didDeleteObjectStore(const WebCore::IDBResultData&); 85 void didRenameObjectStore(const WebCore::IDBResultData&); 84 86 void didClearObjectStore(const WebCore::IDBResultData&); 85 87 void didCreateIndex(const WebCore::IDBResultData&); -
trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in
r202414 r207641 30 30 DidCreateObjectStore(WebCore::IDBResultData result) 31 31 DidDeleteObjectStore(WebCore::IDBResultData result) 32 DidRenameObjectStore(WebCore::IDBResultData result) 32 33 DidClearObjectStore(WebCore::IDBResultData result) 33 34 DidCreateIndex(WebCore::IDBResultData result)
Note: See TracChangeset
for help on using the changeset viewer.