Changeset 254414 in webkit
- Timestamp:
- Jan 12, 2020 11:10:10 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r254410 r254414 1 2019-12-20 Darin Adler <darin@apple.com> 2 3 Remove unneeded MemoryIDBBackingStore::create 4 https://bugs.webkit.org/show_bug.cgi?id=205512 5 6 Reviewed by Youenn Fablet. 7 8 * Modules/indexeddb/server/IDBServer.cpp: 9 (WebCore::IDBServer::IDBServer::createBackingStore): Call makeUnique 10 instead of MemoryIDBBackingStore::create. 11 12 * Modules/indexeddb/server/MemoryCursor.cpp: Removed unneeded include 13 of MemoryIDBBackingStore.h. 14 15 * Modules/indexeddb/server/MemoryIDBBackingStore.cpp: Fixed a comment 16 and replaced a global variable with a constant. 17 (WebCore::IDBServer::MemoryIDBBackingStore::create): Deleted. 18 19 * Modules/indexeddb/server/MemoryIDBBackingStore.h: Made the class 20 final, made more of the member functions private, and moved a couple 21 function members out from in between the data members. 22 1 23 2020-01-11 Zalan Bujtas <zalan@apple.com> 2 24 -
trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp
r253740 r254414 129 129 auto databaseDirectoryPath = this->databaseDirectoryPathIsolatedCopy(); 130 130 if (databaseDirectoryPath.isEmpty()) 131 return MemoryIDBBackingStore::create(m_sessionID, identifier);131 return makeUnique<MemoryIDBBackingStore>(m_sessionID, identifier); 132 132 133 133 return makeUnique<SQLiteIDBBackingStore>(m_sessionID, identifier, databaseDirectoryPath); -
trunk/Source/WebCore/Modules/indexeddb/server/MemoryCursor.cpp
r192490 r254414 30 30 31 31 #include "IDBResourceIdentifier.h" 32 #include "MemoryIDBBackingStore.h"33 32 #include <wtf/HashMap.h> 34 33 #include <wtf/NeverDestroyed.h> -
trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp
r253393 r254414 44 44 namespace IDBServer { 45 45 46 // The IndexedDB spec states the value you can get from the key generator is 2^53 47 static uint64_t maxGeneratedKeyValue = 0x20000000000000; 48 49 std::unique_ptr<MemoryIDBBackingStore> MemoryIDBBackingStore::create(PAL::SessionID sessionID, const IDBDatabaseIdentifier& identifier) 50 { 51 return makeUnique<MemoryIDBBackingStore>(sessionID, identifier); 52 } 46 // The IndexedDB spec states the maximum value you can get from the key generator is 2^53. 47 constexpr uint64_t maxGeneratedKeyValue = 0x20000000000000; 53 48 54 49 MemoryIDBBackingStore::MemoryIDBBackingStore(PAL::SessionID sessionID, const IDBDatabaseIdentifier& identifier) -
trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h
r253377 r254414 40 40 class MemoryObjectStore; 41 41 42 class MemoryIDBBackingStore : public IDBBackingStore {42 class MemoryIDBBackingStore final : public IDBBackingStore { 43 43 WTF_MAKE_FAST_ALLOCATED; 44 44 public: 45 static std::unique_ptr<MemoryIDBBackingStore> create(PAL::SessionID, const IDBDatabaseIdentifier&);46 47 45 MemoryIDBBackingStore(PAL::SessionID, const IDBDatabaseIdentifier&); 48 ~MemoryIDBBackingStore() final;46 ~MemoryIDBBackingStore(); 49 47 50 48 IDBError getOrEstablishDatabaseInfo(IDBDatabaseInfo&) final; 51 49 void setDatabaseInfo(const IDBDatabaseInfo&); 52 50 51 void removeObjectStoreForVersionChangeAbort(MemoryObjectStore&); 52 void restoreObjectStoreForVersionChangeAbort(Ref<MemoryObjectStore>&&); 53 54 private: 53 55 IDBError beginTransaction(const IDBTransactionInfo&) final; 54 56 IDBError abortTransaction(const IDBResourceIdentifier& transactionIdentifier) final; … … 81 83 bool isEphemeral() final { return true; } 82 84 83 void removeObjectStoreForVersionChangeAbort(MemoryObjectStore&);84 void restoreObjectStoreForVersionChangeAbort(Ref<MemoryObjectStore>&&);85 86 85 bool hasTransaction(const IDBResourceIdentifier& identifier) const final { return m_transactions.contains(identifier); } 87 86 88 private:89 87 RefPtr<MemoryObjectStore> takeObjectStoreByIdentifier(uint64_t identifier); 90 88 91 89 void close() final; 90 91 void registerObjectStore(Ref<MemoryObjectStore>&&); 92 void unregisterObjectStore(MemoryObjectStore&); 92 93 93 94 IDBDatabaseIdentifier m_identifier; … … 97 98 HashMap<IDBResourceIdentifier, std::unique_ptr<MemoryBackingStoreTransaction>> m_transactions; 98 99 99 void registerObjectStore(Ref<MemoryObjectStore>&&);100 void unregisterObjectStore(MemoryObjectStore&);101 100 HashMap<uint64_t, RefPtr<MemoryObjectStore>> m_objectStoresByIdentifier; 102 101 HashMap<String, MemoryObjectStore*> m_objectStoresByName;
Note: See TracChangeset
for help on using the changeset viewer.