Changeset 195527 in webkit
- Timestamp:
- Jan 24, 2016 11:55:17 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r195521 r195527 1 2016-01-24 Brady Eidson <beidson@apple.com> 2 3 Modern IDB: Implement deleteIndex and getCount for the SQLite backing store. 4 https://bugs.webkit.org/show_bug.cgi?id=153415 5 6 Reviewed by Darin Adler. 7 8 * platform/mac-wk1/TestExpectations: 9 1 10 2016-01-24 Chris Dumez <cdumez@apple.com> 2 11 -
trunk/LayoutTests/platform/mac-wk1/TestExpectations
r195517 r195527 495 495 storage/indexeddb/modern/idbobjectstore-clear-1.html [ Failure ] 496 496 storage/indexeddb/modern/idbobjectstore-clear-2.html [ Failure ] 497 storage/indexeddb/modern/idbobjectstore-count-1.html [ Failure ]498 497 storage/indexeddb/modern/idbobjectstore-delete-1.html [ Failure ] 499 498 storage/indexeddb/modern/index-1.html [ Failure ] … … 505 504 storage/indexeddb/modern/index-cursor-3.html [ Failure ] 506 505 storage/indexeddb/modern/index-get-count-basic.html [ Failure ] 507 storage/indexeddb/modern/index-get-count-failures.html [ Failure ]508 506 storage/indexeddb/modern/objectstore-cursor-advance-failures.html [ Failure ] 509 507 storage/indexeddb/modern/objectstore-cursor-continue-failures.html [ Failure ] … … 531 529 storage/indexeddb/objectstore-basics.html [ Failure ] 532 530 storage/indexeddb/objectstore-clear.html [ Failure ] 533 storage/indexeddb/objectstore-count.html [ Failure ]534 531 storage/indexeddb/objectstore-cursor.html [ Failure ] 535 532 storage/indexeddb/open-cursor.html [ Failure ] -
trunk/Source/WebCore/ChangeLog
r195525 r195527 1 2016-01-24 Brady Eidson <beidson@apple.com> 2 3 Modern IDB: Implement deleteIndex and getCount for the SQLite backing store. 4 https://bugs.webkit.org/show_bug.cgi?id=153415 5 6 Reviewed by Darin Adler. 7 8 No new tests (Handful of tests now pass, improvements on a handful of others). 9 10 * Modules/indexeddb/server/IDBBackingStore.h: 11 12 * Modules/indexeddb/server/MemoryIDBBackingStore.cpp: 13 (WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex): 14 * Modules/indexeddb/server/MemoryIDBBackingStore.h: 15 16 * Modules/indexeddb/server/MemoryObjectStore.cpp: 17 (WebCore::IDBServer::MemoryObjectStore::takeIndexByIdentifier): 18 (WebCore::IDBServer::MemoryObjectStore::deleteIndex): 19 (WebCore::IDBServer::MemoryObjectStore::deleteAllIndexes): 20 (WebCore::IDBServer::MemoryObjectStore::takeIndexByName): Deleted. 21 * Modules/indexeddb/server/MemoryObjectStore.h: 22 23 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: 24 (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex): 25 (WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex): 26 (WebCore::IDBServer::SQLiteIDBBackingStore::getCount): 27 * Modules/indexeddb/server/SQLiteIDBBackingStore.h: 28 29 * Modules/indexeddb/server/SQLiteIDBCursor.cpp: 30 (WebCore::IDBServer::SQLiteIDBCursor::maybeCreateBackingStoreCursor): 31 (WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor): 32 * Modules/indexeddb/server/SQLiteIDBCursor.h: 33 34 * Modules/indexeddb/server/SQLiteIDBTransaction.cpp: 35 (WebCore::IDBServer::SQLiteIDBTransaction::maybeOpenBackingStoreCursor): 36 * Modules/indexeddb/server/SQLiteIDBTransaction.h: 37 38 * Modules/indexeddb/server/UniqueIDBDatabase.cpp: 39 (WebCore::IDBServer::UniqueIDBDatabase::deleteIndex): 40 (WebCore::IDBServer::UniqueIDBDatabase::performDeleteIndex): 41 (WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteIndex): 42 * Modules/indexeddb/server/UniqueIDBDatabase.h: 43 44 * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp: 45 (WebCore::IDBObjectStoreInfo::deleteIndex): 46 * Modules/indexeddb/shared/IDBObjectStoreInfo.h: 47 1 48 2016-01-24 Brady Eidson <beidson@apple.com> 2 49 -
trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h
r195499 r195527 65 65 virtual IDBError clearObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) = 0; 66 66 virtual IDBError createIndex(const IDBResourceIdentifier& transactionIdentifier, const IDBIndexInfo&) = 0; 67 virtual IDBError deleteIndex(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& indexName) = 0;67 virtual IDBError deleteIndex(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier) = 0; 68 68 virtual IDBError keyExistsInObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&, bool& keyExists) = 0; 69 69 virtual IDBError deleteRange(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&) = 0; -
trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp
r195467 r195527 205 205 } 206 206 207 IDBError MemoryIDBBackingStore::deleteIndex(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& indexName)207 IDBError MemoryIDBBackingStore::deleteIndex(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier) 208 208 { 209 209 LOG(IndexedDB, "MemoryIDBBackingStore::deleteIndex"); … … 217 217 return IDBError(IDBDatabaseException::ConstraintError); 218 218 219 return objectStore->deleteIndex(*rawTransaction, index Name);219 return objectStore->deleteIndex(*rawTransaction, indexIdentifier); 220 220 } 221 221 -
trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h
r195499 r195527 57 57 virtual IDBError clearObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) override final; 58 58 virtual IDBError createIndex(const IDBResourceIdentifier& transactionIdentifier, const IDBIndexInfo&) override final; 59 virtual IDBError deleteIndex(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& indexName) override final;59 virtual IDBError deleteIndex(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier) override final; 60 60 virtual IDBError keyExistsInObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&, bool& keyExists) override final; 61 61 virtual IDBError deleteRange(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&) override final; -
trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp
r194857 r195527 125 125 } 126 126 127 RefPtr<MemoryIndex> MemoryObjectStore::takeIndexBy Name(const String& name)128 { 129 auto indexBy Name = m_indexesByName.take(name);130 if (!indexBy Name)127 RefPtr<MemoryIndex> MemoryObjectStore::takeIndexByIdentifier(uint64_t indexIdentifier) 128 { 129 auto indexByIdentifier = m_indexesByIdentifier.take(indexIdentifier); 130 if (!indexByIdentifier) 131 131 return nullptr; 132 132 133 auto index = m_indexesBy Identifier.take(indexByName->info().identifier());133 auto index = m_indexesByName.take(indexByIdentifier->info().name()); 134 134 ASSERT(index); 135 135 … … 137 137 } 138 138 139 IDBError MemoryObjectStore::deleteIndex(MemoryBackingStoreTransaction& transaction, const String& indexName)139 IDBError MemoryObjectStore::deleteIndex(MemoryBackingStoreTransaction& transaction, uint64_t indexIdentifier) 140 140 { 141 141 LOG(IndexedDB, "MemoryObjectStore::deleteIndex"); … … 144 144 return IDBError(IDBDatabaseException::ConstraintError); 145 145 146 auto index = takeIndexBy Name(indexName);146 auto index = takeIndexByIdentifier(indexIdentifier); 147 147 ASSERT(index); 148 148 if (!index) 149 149 return IDBError(IDBDatabaseException::ConstraintError); 150 150 151 m_info.deleteIndex(index Name);151 m_info.deleteIndex(indexIdentifier); 152 152 transaction.indexDeleted(*index); 153 153 … … 157 157 void MemoryObjectStore::deleteAllIndexes(MemoryBackingStoreTransaction& transaction) 158 158 { 159 Vector< String> indexNames;160 index Names.reserveInitialCapacity(m_indexesByName.size());161 162 for (auto& name : m_indexesByName.keys())163 index Names.uncheckedAppend(name);164 165 for (auto & name : indexNames)166 deleteIndex(transaction, name);159 Vector<uint64_t> indexIdentifiers; 160 indexIdentifiers.reserveInitialCapacity(m_indexesByName.size()); 161 162 for (auto& index : m_indexesByName.values()) 163 indexIdentifiers.uncheckedAppend(index->info().identifier()); 164 165 for (auto identifier : indexIdentifiers) 166 deleteIndex(transaction, identifier); 167 167 } 168 168 -
trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h
r194857 r195527 67 67 68 68 IDBError createIndex(MemoryBackingStoreTransaction&, const IDBIndexInfo&); 69 IDBError deleteIndex(MemoryBackingStoreTransaction&, const String& indexName);69 IDBError deleteIndex(MemoryBackingStoreTransaction&, uint64_t indexIdentifier); 70 70 void deleteAllIndexes(MemoryBackingStoreTransaction&); 71 71 void registerIndex(Ref<MemoryIndex>&&); … … 109 109 void updateCursorsForDeleteRecord(const IDBKeyData&); 110 110 111 RefPtr<MemoryIndex> takeIndexBy Name(const String& name);111 RefPtr<MemoryIndex> takeIndexByIdentifier(uint64_t indexIdentifier); 112 112 113 113 IDBObjectStoreInfo m_info; -
trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp
r195525 r195527 721 721 // Write index records for any records that already exist in this object store. 722 722 723 auto cursor = transaction->maybeOpenBackingStoreCursor(info.objectStoreIdentifier() );723 auto cursor = transaction->maybeOpenBackingStoreCursor(info.objectStoreIdentifier(), 0, IDBKeyRangeData::allKeys()); 724 724 725 725 if (!cursor) { … … 850 850 851 851 852 IDBError SQLiteIDBBackingStore::deleteIndex(const IDBResourceIdentifier&, uint64_t, const String&) 853 { 854 return { IDBDatabaseException::UnknownError, ASCIILiteral("Not implemented") }; 852 IDBError SQLiteIDBBackingStore::deleteIndex(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier) 853 { 854 LOG(IndexedDB, "SQLiteIDBBackingStore::deleteIndex - object store %" PRIu64, objectStoreIdentifier); 855 856 ASSERT(m_sqliteDB); 857 ASSERT(m_sqliteDB->isOpen()); 858 859 auto* transaction = m_transactions.get(transactionIdentifier); 860 if (!transaction || !transaction->inProgress()) { 861 LOG_ERROR("Attempt to delete index without an in-progress transaction"); 862 return { IDBDatabaseException::UnknownError, ASCIILiteral("Attempt to delete index without an in-progress transaction") }; 863 } 864 865 if (transaction->mode() != IndexedDB::TransactionMode::VersionChange) { 866 LOG_ERROR("Attempt to delete index during a non-version-change transaction"); 867 return { IDBDatabaseException::UnknownError, ASCIILiteral("Attempt to delete index during a non-version-change transaction") }; 868 } 869 870 { 871 SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("DELETE FROM IndexInfo WHERE id = ? AND objectStoreID = ?;")); 872 if (sql.prepare() != SQLITE_OK 873 || sql.bindInt64(1, indexIdentifier) != SQLITE_OK 874 || sql.bindInt64(2, objectStoreIdentifier) != SQLITE_OK 875 || sql.step() != SQLITE_DONE) { 876 LOG_ERROR("Could not delete index id %" PRIi64 " from IndexInfo table (%i) - %s", objectStoreIdentifier, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); 877 return { IDBDatabaseException::UnknownError, ASCIILiteral("Error deleting index from database") }; 878 } 879 } 880 881 { 882 SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("DELETE FROM IndexRecords WHERE indexID = ? AND objectStoreID = ?;")); 883 if (sql.prepare() != SQLITE_OK 884 || sql.bindInt64(1, indexIdentifier) != SQLITE_OK 885 || sql.bindInt64(2, objectStoreIdentifier) != SQLITE_OK 886 || sql.step() != SQLITE_DONE) { 887 LOG_ERROR("Could not delete index records for index id %" PRIi64 " from IndexRecords table (%i) - %s", indexIdentifier, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); 888 return { IDBDatabaseException::UnknownError, ASCIILiteral("Error deleting index records from database") }; 889 } 890 } 891 892 return { }; 855 893 } 856 894 … … 1094 1132 } 1095 1133 1096 IDBError SQLiteIDBBackingStore::getCount(const IDBResourceIdentifier&, uint64_t, uint64_t, const IDBKeyRangeData&, uint64_t&) 1097 { 1098 return { IDBDatabaseException::UnknownError, ASCIILiteral("Not implemented") }; 1134 IDBError SQLiteIDBBackingStore::getCount(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const IDBKeyRangeData& range, uint64_t& outCount) 1135 { 1136 LOG(IndexedDB, "SQLiteIDBBackingStore::getCount - object store %" PRIu64, objectStoreIdentifier); 1137 ASSERT(m_sqliteDB); 1138 ASSERT(m_sqliteDB->isOpen()); 1139 1140 outCount = 0; 1141 1142 auto* transaction = m_transactions.get(transactionIdentifier); 1143 if (!transaction || !transaction->inProgress()) { 1144 LOG_ERROR("Attempt to get count from database without an in-progress transaction"); 1145 return { IDBDatabaseException::UnknownError, ASCIILiteral("Attempt to get count from database without an in-progress transaction") }; 1146 } 1147 1148 auto cursor = transaction->maybeOpenBackingStoreCursor(objectStoreIdentifier, indexIdentifier, range); 1149 if (!cursor) { 1150 LOG_ERROR("Cannot open cursor to populate indexes in database"); 1151 return { IDBDatabaseException::UnknownError, ASCIILiteral("Unable to populate indexes in database") }; 1152 } 1153 1154 while (cursor->advance(1)) 1155 ++outCount; 1156 1157 return { }; 1099 1158 } 1100 1159 -
trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h
r195517 r195527 60 60 virtual IDBError clearObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier) override final; 61 61 virtual IDBError createIndex(const IDBResourceIdentifier& transactionIdentifier, const IDBIndexInfo&) override final; 62 virtual IDBError deleteIndex(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& indexName) override final;62 virtual IDBError deleteIndex(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier) override final; 63 63 virtual IDBError keyExistsInObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&, bool& keyExists) override final; 64 64 virtual IDBError deleteRange(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&) override final; -
trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.cpp
r195517 r195527 52 52 } 53 53 54 std::unique_ptr<SQLiteIDBCursor> SQLiteIDBCursor::maybeCreateBackingStoreCursor(SQLiteIDBTransaction& transaction, const uint64_t objectStoreI dentifier)55 { 56 auto cursor = std::make_unique<SQLiteIDBCursor>(transaction, objectStoreI dentifier);54 std::unique_ptr<SQLiteIDBCursor> SQLiteIDBCursor::maybeCreateBackingStoreCursor(SQLiteIDBTransaction& transaction, const uint64_t objectStoreID, const uint64_t indexID, const IDBKeyRangeData& range) 55 { 56 auto cursor = std::make_unique<SQLiteIDBCursor>(transaction, objectStoreID, indexID, range); 57 57 58 58 if (!cursor->establishStatement()) … … 76 76 } 77 77 78 SQLiteIDBCursor::SQLiteIDBCursor(SQLiteIDBTransaction& transaction, uint64_t objectStoreID)78 SQLiteIDBCursor::SQLiteIDBCursor(SQLiteIDBTransaction& transaction, const uint64_t objectStoreID, const uint64_t indexID, const IDBKeyRangeData& range) 79 79 : m_transaction(&transaction) 80 80 , m_cursorIdentifier(transaction.transactionIdentifier()) 81 81 , m_objectStoreID(objectStoreID) 82 , m_indexID(indexID ? indexID : IDBIndexMetadata::InvalidId) 82 83 , m_cursorDirection(IndexedDB::CursorDirection::Next) 84 , m_keyRange(range) 83 85 { 84 86 ASSERT(m_objectStoreID); -
trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.h
r195517 r195527 47 47 public: 48 48 static std::unique_ptr<SQLiteIDBCursor> maybeCreate(SQLiteIDBTransaction&, const IDBCursorInfo&); 49 static std::unique_ptr<SQLiteIDBCursor> maybeCreateBackingStoreCursor(SQLiteIDBTransaction&, const uint64_t objectStoreIdentifier );49 static std::unique_ptr<SQLiteIDBCursor> maybeCreateBackingStoreCursor(SQLiteIDBTransaction&, const uint64_t objectStoreIdentifier, const uint64_t indexIdentifier, const IDBKeyRangeData&); 50 50 51 51 SQLiteIDBCursor(SQLiteIDBTransaction&, const IDBCursorInfo&); 52 SQLiteIDBCursor(SQLiteIDBTransaction&, uint64_t objectStoreID );52 SQLiteIDBCursor(SQLiteIDBTransaction&, uint64_t objectStoreID, uint64_t indexID, const IDBKeyRangeData&); 53 53 54 54 const IDBResourceIdentifier& identifier() const { return m_cursorIdentifier; } -
trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.cpp
r195517 r195527 100 100 } 101 101 102 std::unique_ptr<SQLiteIDBCursor> SQLiteIDBTransaction::maybeOpenBackingStoreCursor(uint64_t objectStoreID )102 std::unique_ptr<SQLiteIDBCursor> SQLiteIDBTransaction::maybeOpenBackingStoreCursor(uint64_t objectStoreID, uint64_t indexID, const IDBKeyRangeData& range) 103 103 { 104 104 ASSERT(m_sqliteTransaction); 105 105 ASSERT(m_sqliteTransaction->inProgress()); 106 106 107 return SQLiteIDBCursor::maybeCreateBackingStoreCursor(*this, objectStoreID );107 return SQLiteIDBCursor::maybeCreateBackingStoreCursor(*this, objectStoreID, indexID, range); 108 108 } 109 109 -
trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.h
r195517 r195527 60 60 IDBError abort(); 61 61 62 std::unique_ptr<SQLiteIDBCursor> maybeOpenBackingStoreCursor(uint64_t objectStoreID );62 std::unique_ptr<SQLiteIDBCursor> maybeOpenBackingStoreCursor(uint64_t objectStoreID, uint64_t indexID, const IDBKeyRangeData&); 63 63 SQLiteIDBCursor* maybeOpenCursor(const IDBCursorInfo&); 64 64 -
trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp
r195499 r195527 608 608 609 609 uint64_t callbackID = storeCallback(callback); 610 m_server.postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::performDeleteIndex, callbackID, transaction.info().identifier(), objectStoreIdentifier, indexName)); 611 } 612 613 void UniqueIDBDatabase::performDeleteIndex(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& indexName) 610 611 auto* objectStoreInfo = m_databaseInfo->infoForExistingObjectStore(objectStoreIdentifier); 612 if (!objectStoreInfo) { 613 performErrorCallback(callbackID, { IDBDatabaseException::UnknownError, ASCIILiteral("Attempt to delete index from non-existant object store") }); 614 return; 615 } 616 617 auto* indexInfo = objectStoreInfo->infoForExistingIndex(indexName); 618 if (!indexInfo) { 619 performErrorCallback(callbackID, { IDBDatabaseException::UnknownError, ASCIILiteral("Attempt to delete non-existant index") }); 620 return; 621 } 622 623 m_server.postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::performDeleteIndex, callbackID, transaction.info().identifier(), objectStoreIdentifier, indexInfo->identifier())); 624 } 625 626 void UniqueIDBDatabase::performDeleteIndex(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const uint64_t indexIdentifier) 614 627 { 615 628 ASSERT(!isMainThread()); … … 617 630 618 631 ASSERT(m_backingStore); 619 m_backingStore->deleteIndex(transactionIdentifier, objectStoreIdentifier, index Name);632 m_backingStore->deleteIndex(transactionIdentifier, objectStoreIdentifier, indexIdentifier); 620 633 621 634 IDBError error; 622 m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformDeleteIndex, callbackIdentifier, error, objectStoreIdentifier, index Name));623 } 624 625 void UniqueIDBDatabase::didPerformDeleteIndex(uint64_t callbackIdentifier, const IDBError& error, uint64_t objectStoreIdentifier, const String& indexName)635 m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformDeleteIndex, callbackIdentifier, error, objectStoreIdentifier, indexIdentifier)); 636 } 637 638 void UniqueIDBDatabase::didPerformDeleteIndex(uint64_t callbackIdentifier, const IDBError& error, uint64_t objectStoreIdentifier, uint64_t indexIdentifier) 626 639 { 627 640 ASSERT(isMainThread()); … … 631 644 auto* objectStoreInfo = m_databaseInfo->infoForExistingObjectStore(objectStoreIdentifier); 632 645 if (objectStoreInfo) 633 objectStoreInfo->deleteIndex(index Name);646 objectStoreInfo->deleteIndex(indexIdentifier); 634 647 } 635 648 -
trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h
r195499 r195527 135 135 void performClearObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier); 136 136 void performCreateIndex(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, const IDBIndexInfo&); 137 void performDeleteIndex(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const String& indexName);137 void performDeleteIndex(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier); 138 138 void performPutOrAdd(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&, const ThreadSafeDataBuffer& valueData, IndexedDB::ObjectStoreOverwriteMode); 139 139 void performGetRecord(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&); … … 152 152 void didPerformClearObjectStore(uint64_t callbackIdentifier, const IDBError&); 153 153 void didPerformCreateIndex(uint64_t callbackIdentifier, const IDBError&, const IDBIndexInfo&); 154 void didPerformDeleteIndex(uint64_t callbackIdentifier, const IDBError&, uint64_t objectStoreIdentifier, const String& indexName);154 void didPerformDeleteIndex(uint64_t callbackIdentifier, const IDBError&, uint64_t objectStoreIdentifier, uint64_t indexIdentifier); 155 155 void didPerformPutOrAdd(uint64_t callbackIdentifier, const IDBError&, const IDBKeyData&); 156 156 void didPerformGetRecord(uint64_t callbackIdentifier, const IDBError&, const IDBGetResult&); -
trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.cpp
r192645 r195527 114 114 } 115 115 116 void IDBObjectStoreInfo::deleteIndex(uint64_t indexIdentifier) 117 { 118 m_indexMap.remove(indexIdentifier); 119 } 120 116 121 #ifndef NDEBUG 117 122 String IDBObjectStoreInfo::loggingString(int indent) const -
trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.h
r195467 r195527 60 60 61 61 void deleteIndex(const String& indexName); 62 void deleteIndex(uint64_t indexIdentifier); 62 63 63 64 #ifndef NDEBUG
Note: See TracChangeset
for help on using the changeset viewer.