-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make IDBRequestData::transactionIdentifier return std::optional
https://bugs.webkit.org/show_bug.cgi?id=269957 rdar://123479310 Reviewed by Alex Christensen. IDBRequestData can be constructed based on IPC messages sent from web process, so we should not assume IDBRequestData::m_transactionIdentifier is always valid. To fix that, this patch makes IDBRequestData::transactionIdentifier return std::optional and adds null checks in the caller side. * Source/WebCore/Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::idbTransaction const): (WebCore::IDBServer::IDBServer::createObjectStore): (WebCore::IDBServer::IDBServer::deleteObjectStore): (WebCore::IDBServer::IDBServer::renameObjectStore): (WebCore::IDBServer::IDBServer::clearObjectStore): (WebCore::IDBServer::IDBServer::createIndex): (WebCore::IDBServer::IDBServer::deleteIndex): (WebCore::IDBServer::IDBServer::renameIndex): (WebCore::IDBServer::IDBServer::putOrAdd): (WebCore::IDBServer::IDBServer::getRecord): (WebCore::IDBServer::IDBServer::getAllRecords): (WebCore::IDBServer::IDBServer::getCount): (WebCore::IDBServer::IDBServer::deleteRecord): (WebCore::IDBServer::IDBServer::openCursor): (WebCore::IDBServer::IDBServer::iterateCursor): * Source/WebCore/Modules/indexeddb/server/IDBServer.h: * Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp: (WebCore::IDBServer::UniqueIDBDatabase::putOrAdd): (WebCore::IDBServer::UniqueIDBDatabase::putOrAddAfterSpaceCheck): (WebCore::IDBServer::UniqueIDBDatabase::getRecord): (WebCore::IDBServer::UniqueIDBDatabase::getAllRecords): (WebCore::IDBServer::UniqueIDBDatabase::getCount): (WebCore::IDBServer::UniqueIDBDatabase::deleteRecord): (WebCore::IDBServer::UniqueIDBDatabase::openCursor): (WebCore::IDBServer::UniqueIDBDatabase::iterateCursor): * Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp: (WebCore::IDBServer::UniqueIDBDatabaseTransaction::createObjectStore): (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteObjectStore): (WebCore::IDBServer::UniqueIDBDatabaseTransaction::renameObjectStore): (WebCore::IDBServer::UniqueIDBDatabaseTransaction::clearObjectStore): (WebCore::IDBServer::UniqueIDBDatabaseTransaction::createIndex): (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteIndex): (WebCore::IDBServer::UniqueIDBDatabaseTransaction::renameIndex): (WebCore::IDBServer::UniqueIDBDatabaseTransaction::putOrAdd): (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord): (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getAllRecords): (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getCount): (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteRecord): (WebCore::IDBServer::UniqueIDBDatabaseTransaction::openCursor): (WebCore::IDBServer::UniqueIDBDatabaseTransaction::iterateCursor): * Source/WebCore/Modules/indexeddb/shared/IDBRequestData.cpp: (WebCore::IDBRequestData::transactionIdentifier const): * Source/WebCore/Modules/indexeddb/shared/IDBRequestData.h: * Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp: (WebKit::NetworkStorageManager::idbTransaction): (WebKit::NetworkStorageManager::createObjectStore): (WebKit::NetworkStorageManager::deleteObjectStore): (WebKit::NetworkStorageManager::renameObjectStore): (WebKit::NetworkStorageManager::clearObjectStore): (WebKit::NetworkStorageManager::createIndex): (WebKit::NetworkStorageManager::deleteIndex): (WebKit::NetworkStorageManager::renameIndex): (WebKit::NetworkStorageManager::putOrAdd): (WebKit::NetworkStorageManager::getRecord): (WebKit::NetworkStorageManager::getAllRecords): (WebKit::NetworkStorageManager::getCount): (WebKit::NetworkStorageManager::deleteRecord): (WebKit::NetworkStorageManager::openCursor): (WebKit::NetworkStorageManager::iterateCursor): * Source/WebKit/NetworkProcess/storage/NetworkStorageManager.h: Canonical link: https://commits.webkit.org/275222@main
- Loading branch information
Showing
8 changed files
with
103 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.