Skip to content

Commit

Permalink
Deploy more smart pointers in NetworkStorageManager.cpp
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=279558

Reviewed by Sihui Liu.

Deployed more smart pointers in the file as warned by the clang static analyzer.

* Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
* Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
* Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp:
(WebKit::NetworkStorageManager::NetworkStorageManager):
(WebKit::NetworkStorageManager::protectedProcess const):
(WebKit::NetworkStorageManager::close):
(WebKit::NetworkStorageManager::stopReceivingMessageFromConnection):
(WebKit::NetworkStorageManager::prepareForEviction):
(WebKit::NetworkStorageManager::protectedWorkQueue const):
(WebKit::NetworkStorageManager::originQuotaManagerParameters):
(WebKit::NetworkStorageManager::fetchRegistrableDomainsForPersist):
(WebKit::NetworkStorageManager::didFetchRegistrableDomainsForPersist):
(WebKit::NetworkStorageManager::persist):
(WebKit::NetworkStorageManager::resetStoragePersistedState):
(WebKit::NetworkStorageManager::clearStorageForWebPage):
(WebKit::NetworkStorageManager::cloneSessionStorageForWebPage):
(WebKit::NetworkStorageManager::didIncreaseQuota):
(WebKit::NetworkStorageManager::fetchData):
(WebKit::NetworkStorageManager::deleteData):
(WebKit::NetworkStorageManager::deleteDataModifiedSince):
(WebKit::NetworkStorageManager::deleteDataForRegistrableDomains):
(WebKit::NetworkStorageManager::moveData):
(WebKit::NetworkStorageManager::getOriginDirectory):
(WebKit::NetworkStorageManager::suspend):
(WebKit::NetworkStorageManager::resume):
(WebKit::NetworkStorageManager::handleLowMemoryWarning):
(WebKit::NetworkStorageManager::syncLocalStorage):
(WebKit::NetworkStorageManager::registerTemporaryBlobFilePaths):
(WebKit::NetworkStorageManager::requestSpace):
(WebKit::NetworkStorageManager::setOriginQuotaRatioEnabledForTesting):
(WebKit::NetworkStorageManager::setStorageSiteValidationEnabled):
(WebKit::NetworkStorageManager::addAllowedSitesForConnection):
(WebKit::NetworkStorageManager::abortOpenAndUpgradeNeeded):
(WebKit::NetworkStorageManager::didFireVersionChangeEvent):
(WebKit::NetworkStorageManager::abortTransaction):
(WebKit::NetworkStorageManager::commitTransaction):
(WebKit::NetworkStorageManager::didFinishHandlingVersionChangeTransaction):
(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):
(WebKit::NetworkStorageManager::dispatchTaskToBackgroundFetchManager):
(WebKit::NetworkStorageManager::closeServiceWorkerRegistrationFiles):
(WebKit::NetworkStorageManager::importServiceWorkerRegistrations):
(WebKit::NetworkStorageManager::updateServiceWorkerRegistrations):
* Source/WebKit/NetworkProcess/storage/NetworkStorageManager.h:
* Source/WebKit/NetworkProcess/storage/OriginStorageManager.cpp:
(WebKit::OriginStorageManager::protectedQuotaManager):
* Source/WebKit/NetworkProcess/storage/OriginStorageManager.h:
(WebKit::OriginStorageManager::path const): Deleted.
(WebKit::OriginStorageManager::originFileCreationTimestamp const): Deleted.
(WebKit::OriginStorageManager::setOriginFileCreationTimestamp): Deleted.
(WebKit::OriginStorageManager::includedInBackup const): Deleted.
(WebKit::OriginStorageManager::markIncludedInBackup): Deleted.

Canonical link: https://commits.webkit.org/283598@main
  • Loading branch information
rniwa committed Sep 13, 2024
1 parent d5cc1a1 commit 513e79a
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 84 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class UniqueIDBDatabaseConnection : public RefCounted<UniqueIDBDatabaseConnectio
public:
static Ref<UniqueIDBDatabaseConnection> create(UniqueIDBDatabase&, ServerOpenDBRequest&);

~UniqueIDBDatabaseConnection();
WEBCORE_EXPORT ~UniqueIDBDatabaseConnection();

const IDBResourceIdentifier& openRequestIdentifier() { return m_openRequestIdentifier; }
UniqueIDBDatabase* database() { return m_database.get(); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class UniqueIDBDatabaseTransaction : public CanMakeWeakPtr<UniqueIDBDatabaseTran
public:
static Ref<UniqueIDBDatabaseTransaction> create(UniqueIDBDatabaseConnection&, const IDBTransactionInfo&);

~UniqueIDBDatabaseTransaction();
WEBCORE_EXPORT ~UniqueIDBDatabaseTransaction();

UniqueIDBDatabaseConnection* databaseConnection() const;
UniqueIDBDatabase* database() const;
Expand Down
Loading

0 comments on commit 513e79a

Please sign in to comment.