[webkit-changes] [WebKit/WebKit] c25e27: Deploy more smart pointers in WebsiteDataStore.cpp

Ryosuke Niwa noreply at github.com
Tue Aug 22 15:14:56 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c25e2794cc5efd55ee34156ebe6cfe62b1890c33
      https://github.com/WebKit/WebKit/commit/c25e2794cc5efd55ee34156ebe6cfe62b1890c33
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2023-08-22 (Tue, 22 Aug 2023)

  Changed paths:
    M Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
    M Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h

  Log Message:
  -----------
  Deploy more smart pointers in WebsiteDataStore.cpp
https://bugs.webkit.org/show_bug.cgi?id=260441

Reviewed by Sihui Liu.

Make more use of smart pointers in this file. Most notably, store NetworkProcessProxy
in a local Ref before calling any non-trivial member functions on it.

* Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::protectedNetworkProcess const): Added.
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::setServiceWorkerTimeoutForTesting):
(WebKit::WebsiteDataStore::resetServiceWorkerTimeoutForTesting):
(WebKit::WebsiteDataStore::setMaxStatisticsEntries):
(WebKit::WebsiteDataStore::setPruneEntriesDownTo):
(WebKit::WebsiteDataStore::setGrandfatheringTime):
(WebKit::WebsiteDataStore::setMinimumTimeBetweenDataRecordsRemoval):
(WebKit::WebsiteDataStore::dumpResourceLoadStatistics):
(WebKit::WebsiteDataStore::isPrevalentResource):
(WebKit::WebsiteDataStore::isGrandfathered):
(WebKit::WebsiteDataStore::setPrevalentResource):
(WebKit::WebsiteDataStore::setPrevalentResourceForDebugMode):
(WebKit::WebsiteDataStore::isVeryPrevalentResource):
(WebKit::WebsiteDataStore::setVeryPrevalentResource):
(WebKit::WebsiteDataStore::setShouldClassifyResourcesBeforeDataRecordsRemoval):
(WebKit::WebsiteDataStore::setSubframeUnderTopFrameDomain):
(WebKit::WebsiteDataStore::isRegisteredAsSubFrameUnder):
(WebKit::WebsiteDataStore::setSubresourceUnderTopFrameDomain):
(WebKit::WebsiteDataStore::isRegisteredAsSubresourceUnder):
(WebKit::WebsiteDataStore::setSubresourceUniqueRedirectTo):
(WebKit::WebsiteDataStore::setSubresourceUniqueRedirectFrom):
(WebKit::WebsiteDataStore::setTopFrameUniqueRedirectTo):
(WebKit::WebsiteDataStore::setTopFrameUniqueRedirectFrom):
(WebKit::WebsiteDataStore::isRegisteredAsRedirectingTo):
(WebKit::WebsiteDataStore::clearPrevalentResource):
(WebKit::WebsiteDataStore::resetParametersToDefaultValues):
(WebKit::WebsiteDataStore::scheduleClearInMemoryAndPersistent):
(WebKit::WebsiteDataStore::getResourceLoadStatisticsDataSummary):
(WebKit::WebsiteDataStore::scheduleCookieBlockingUpdate):
(WebKit::WebsiteDataStore::scheduleStatisticsAndDataRecordsProcessing):
(WebKit::WebsiteDataStore::statisticsDatabaseHasAllTables):
(WebKit::WebsiteDataStore::setLastSeen):
(WebKit::WebsiteDataStore::domainIDExistsInDatabase):
(WebKit::WebsiteDataStore::mergeStatisticForTesting):
(WebKit::WebsiteDataStore::insertExpiredStatisticForTesting):
(WebKit::WebsiteDataStore::setNotifyPagesWhenDataRecordsWereScanned):
(WebKit::WebsiteDataStore::setResourceLoadStatisticsTimeAdvanceForTesting):
(WebKit::WebsiteDataStore::setIsRunningResourceLoadStatisticsTest):
(WebKit::WebsiteDataStore::getAllStorageAccessEntries):
(WebKit::WebsiteDataStore::setTimeToLiveUserInteraction):
(WebKit::WebsiteDataStore::logUserInteraction):
(WebKit::WebsiteDataStore::hasHadUserInteraction):
(WebKit::WebsiteDataStore::isRelationshipOnlyInDatabaseOnce):
(WebKit::WebsiteDataStore::clearUserInteraction):
(WebKit::WebsiteDataStore::setGrandfathered):
(WebKit::WebsiteDataStore::setCrossSiteLoadWithLinkDecorationForTesting):
(WebKit::WebsiteDataStore::resetCrossSiteLoadsWithLinkDecorationForTesting):
(WebKit::WebsiteDataStore::deleteCookiesForTesting):
(WebKit::WebsiteDataStore::hasLocalStorageForTesting const):
(WebKit::WebsiteDataStore::hasIsolatedSessionForTesting const):
(WebKit::WebsiteDataStore::setResourceLoadStatisticsShouldDowngradeReferrerForTesting):
(WebKit::WebsiteDataStore::setThirdPartyCookieBlockingMode):
(WebKit::WebsiteDataStore::setResourceLoadStatisticsShouldEnbleSameSiteStrictEnforcementForTesting):
(WebKit::WebsiteDataStore::setResourceLoadStatisticsFirstPartyWebsiteDataRemovalModeForTesting):
(WebKit::WebsiteDataStore::setResourceLoadStatisticsToSameSiteStrictCookiesForTesting):
(WebKit::WebsiteDataStore::setResourceLoadStatisticsFirstPartyHostCNAMEDomainForTesting):
(WebKit::WebsiteDataStore::setResourceLoadStatisticsThirdPartyCNAMEDomainForTesting):
(WebKit::WebsiteDataStore::syncLocalStorage):
(WebKit::WebsiteDataStore::storeServiceWorkerRegistrations):
(WebKit::WebsiteDataStore::setCacheMaxAgeCapForPrevalentResources):
(WebKit::WebsiteDataStore::resetCacheMaxAgeCapForPrevalentResources):
(WebKit::WebsiteDataStore::allowSpecificHTTPSCertificateForHost):
(WebKit::WebsiteDataStore::allowTLSCertificateChainForLocalPCMTesting):
(WebKit::WebsiteDataStore::getNetworkProcessConnection):
(WebKit::WebsiteDataStore::sendNetworkProcessPrepareToSuspendForTesting):
(WebKit::WebsiteDataStore::sendNetworkProcessWillSuspendImminentlyForTesting):
(WebKit::WebsiteDataStore::sendNetworkProcessDidResume):
(WebKit::WebsiteDataStore::setTrackingPreventionEnabled):
(WebKit::WebsiteDataStore::setStatisticsTestingCallback):
(WebKit::WebsiteDataStore::setResourceLoadStatisticsDebugMode):
(WebKit::WebsiteDataStore::isResourceLoadStatisticsEphemeral const):
(WebKit::WebsiteDataStore::setPrivateClickMeasurementDebugMode):
(WebKit::WebsiteDataStore::storePrivateClickMeasurement):
(WebKit::WebsiteDataStore::closeDatabases):
(WebKit::WebsiteDataStore::setAllowsAnySSLCertificateForWebSocket):
(WebKit::WebsiteDataStore::resetQuota):
(WebKit::WebsiteDataStore::resetStoragePersistedState):
(WebKit::WebsiteDataStore::renameOriginInWebsiteData):
(WebKit::WebsiteDataStore::originDirectoryForTesting):
(WebKit::WebsiteDataStore::hasAppBoundSession const):
(WebKit::WebsiteDataStore::clearAppBoundSession):
(WebKit::WebsiteDataStore::setAppBoundDomainsForITP):
(WebKit::WebsiteDataStore::setManagedDomainsForITP):
(WebKit::WebsiteDataStore::updateBundleIdentifierInNetworkProcess):
(WebKit::WebsiteDataStore::clearBundleIdentifierInNetworkProcess):
(WebKit::WebsiteDataStore::countNonDefaultSessionSets):
(WebKit::WebsiteDataStore::setEmulatedConditions):
(WebKit::WebsiteDataStore::createDownloadProxy):
(WebKit::WebsiteDataStore::download):
(WebKit::WebsiteDataStore::resumeDownload):
(WebKit::WebsiteDataStore::clearProxyConfigData):
(WebKit::WebsiteDataStore::setProxyConfigData):

Canonical link: https://commits.webkit.org/267150@main




More information about the webkit-changes mailing list