Skip to content

[SaferCPP] Improve smart pointer adoption in the UIProcess C API, part 3/3 #47206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

zakariaridouh
Copy link
Contributor

@zakariaridouh zakariaridouh commented Jun 25, 2025

6331db8

[SaferCPP] Improve smart pointer adoption in the UIProcess C API, part 3/3
https://bugs.webkit.org/show_bug.cgi?id=294994
rdar://154329301

Reviewed by Chris Dumez.

Finish the last two files with failing smart pointer warnings in the UIProcess C API:

        - Source/WebKit/UIProcess/API/C/WKContext.cpp
        - Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp

* Source/WebKit/SaferCPPExpectations/UncountedCallArgsCheckerExpectations:
* Source/WebKit/UIProcess/API/C/WKContext.cpp:
(WKContextSetClient):
(WKContextSetInjectedBundleClient):
(WKContextSetDownloadClient):
(WKContextPostMessageToInjectedBundle):
(WKContextAddVisitedLink):
(WKContextSetAlwaysUsesComplexTextCodePath):
(WKContextSetDisableFontSubpixelAntialiasingForTesting):
(WKContextRegisterURLSchemeAsEmptyDocument):
(WKContextRegisterURLSchemeAsSecure):
(WKContextRegisterURLSchemeAsBypassingContentSecurityPolicy):
(WKContextRegisterURLSchemeAsCachePartitioned):
(WKContextRegisterURLSchemeAsCanDisplayOnlyIfCanRequest):
(WKContextSetDomainRelaxationForbiddenForURLScheme):
(WKContextGetGeolocationManager):
(WKContextGetNotificationManager):
(WKContextStartMemorySampler):
(WKContextStopMemorySampler):
(WKContextDisableProcessTermination):
(WKContextEnableProcessTermination):
(WKContextSetHTTPPipeliningEnabled):
(WKContextWarmInitialProcess):
(WKContextSetJavaScriptConfigurationFileEnabled):
(WKContextGarbageCollectJavaScriptObjects):
(WKContextSetJavaScriptGarbageCollectorTimerEnabled):
(WKContextSetMemoryCacheDisabled):
(WKContextSetFontAllowList):
(WKContextTerminateServiceWorkers):
(WKContextClearCurrentModifierStateForTesting):
(WKContextSetLocalhostAliases):
(WKContextSetResourceMonitorURLsForTesting):
* Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreTerminateNetworkProcess):
(WKWebsiteDataStoreGetNetworkProcessIdentifier):
(WKWebsiteDataStoreRemoveITPDataForDomain):
(WKWebsiteDataStoreDoesStatisticsDomainIDExistInDatabase):
(WKWebsiteDataStoreSetServiceWorkerFetchTimeoutForTesting):
(WKWebsiteDataStoreResetServiceWorkerFetchTimeoutForTesting):
(WKWebsiteDataStoreSetResourceLoadStatisticsEnabled):
(WKWebsiteDataStoreIsStatisticsEphemeral):
(WKWebsiteDataStoreGetResourceLoadStatisticsEnabled):
(WKWebsiteDataStoreSetResourceLoadStatisticsDebugMode):
(WKWebsiteDataStoreSyncLocalStorage):
(WKWebsiteDataStoreGetHTTPCookieStore):
(WKWebsiteDataStoreSetResourceLoadStatisticsDebugModeWithCompletionHandler):
(WKWebsiteDataStoreSetResourceLoadStatisticsPrevalentResourceForDebugMode):
(WKWebsiteDataStoreSetStatisticsLastSeen):
(WKWebsiteDataStoreSetStatisticsMergeStatistic):
(WKWebsiteDataStoreSetStatisticsExpiredStatistic):
(WKWebsiteDataStoreSetStatisticsPrevalentResource):
(WKWebsiteDataStoreSetStatisticsVeryPrevalentResource):
(WKWebsiteDataStoreDumpResourceLoadStatistics):
(WKWebsiteDataStoreIsStatisticsPrevalentResource):
(WKWebsiteDataStoreIsStatisticsVeryPrevalentResource):
(WKWebsiteDataStoreIsStatisticsRegisteredAsSubresourceUnder):
(WKWebsiteDataStoreIsStatisticsRegisteredAsSubFrameUnder):
(WKWebsiteDataStoreIsStatisticsRegisteredAsRedirectingTo):
(WKWebsiteDataStoreSetStatisticsHasHadUserInteraction):
(WKWebsiteDataStoreIsStatisticsHasHadUserInteraction):
(WKWebsiteDataStoreIsStatisticsOnlyInDatabaseOnce):
(WKWebsiteDataStoreSetStatisticsGrandfathered):
(WKWebsiteDataStoreIsStatisticsGrandfathered):
(WKWebsiteDataStoreSetStatisticsSubframeUnderTopFrameOrigin):
(WKWebsiteDataStoreSetStatisticsSubresourceUnderTopFrameOrigin):
(WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectTo):
(WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectFrom):
(WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectTo):
(WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectFrom):
(WKWebsiteDataStoreSetStatisticsCrossSiteLoadWithLinkDecoration):
(WKWebsiteDataStoreSetStatisticsTimeToLiveUserInteraction):
(WKWebsiteDataStoreStatisticsProcessStatisticsAndDataRecords):
(WKWebsiteDataStoreStatisticsUpdateCookieBlocking):
(WKWebsiteDataStoreSetResourceLoadStatisticsTimeAdvanceForTesting):
(WKWebsiteDataStoreSetStatisticsIsRunningTest):
(WKWebsiteDataStoreSetStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval):
(WKWebsiteDataStoreSetStatisticsMinimumTimeBetweenDataRecordsRemoval):
(WKWebsiteDataStoreSetStatisticsGrandfatheringTime):
(WKWebsiteDataStoreSetStatisticsMaxStatisticsEntries):
(WKWebsiteDataStoreSetStatisticsPruneEntriesDownTo):
(WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStore):
(WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
(WKWebsiteDataStoreStatisticsClearThroughWebsiteDataRemoval):
(WKWebsiteDataStoreStatisticsDeleteCookiesForTesting):
(WKWebsiteDataStoreStatisticsHasLocalStorage):
(WKWebsiteDataStoreSetStatisticsCacheMaxAgeCap):
(WKWebsiteDataStoreStatisticsHasIsolatedSession):
(WKWebsiteDataStoreSetResourceLoadStatisticsShouldDowngradeReferrerForTesting):
(WKWebsiteDataStoreSetResourceLoadStatisticsShouldBlockThirdPartyCookiesForTesting):
(WKWebsiteDataStoreSetResourceLoadStatisticsFirstPartyWebsiteDataRemovalModeForTesting):
(WKWebsiteDataStoreSetResourceLoadStatisticsToSameSiteStrictCookiesForTesting):
(WKWebsiteDataStoreSetResourceLoadStatisticsFirstPartyHostCNAMEDomainForTesting):
(WKWebsiteDataStoreSetResourceLoadStatisticsThirdPartyCNAMEDomainForTesting):
(WKWebsiteDataStoreRemoveAllFetchCaches):
(WKWebsiteDataStoreRemoveNetworkCache):
(WKWebsiteDataStoreRemoveMemoryCaches):
(WKWebsiteDataStoreRemoveFetchCacheForOrigin):
(WKWebsiteDataStoreRemoveAllIndexedDatabases):
(WKWebsiteDataStoreRemoveLocalStorage):
(WKWebsiteDataStoreRemoveAllServiceWorkerRegistrations):
(WKWebsiteDataStoreGetFetchCacheOrigins):
(WKWebsiteDataStoreGetFetchCacheSizeForOrigin):
(WKWebsiteDataStoreClearAllDeviceOrientationPermissions):
(WKWebsiteDataStoreClearPrivateClickMeasurementsThroughWebsiteDataRemoval):
(WKWebsiteDataStoreSetCacheModelSynchronouslyForTesting):
(WKWebsiteDataStoreResetQuota):
(WKWebsiteDataStoreResetStoragePersistedState):
(WKWebsiteDataStoreClearStorage):
(WKWebsiteDataStoreSetOriginQuotaRatioEnabled):
(WKWebsiteDataStoreUpdateBundleIdentifierInNetworkProcess):
(WKWebsiteDataStoreClearBundleIdentifierInNetworkProcess):
(WKWebsiteDataStoreGetAllStorageAccessEntries):
(WKWebsiteDataStoreResetResourceMonitorThrottler):

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

b51b5c6

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ⏳ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🛠 wpe-cairo
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@zakariaridouh zakariaridouh requested a review from cdumez as a code owner June 25, 2025 21:38
@zakariaridouh zakariaridouh self-assigned this Jun 25, 2025
@zakariaridouh zakariaridouh added the New Bugs Unclassified bugs are placed in this component until the correct component can be determined. label Jun 25, 2025
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jun 25, 2025
@webkit-ews-buildbot
Copy link
Collaborator

Safer C++ Build #41597 (f6d1647)

❌ Found 2 failing files with 6 issues. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming.
(cc @rniwa)

@zakariaridouh zakariaridouh removed the merging-blocked Applied to prevent a change from being merged label Jun 26, 2025
@zakariaridouh zakariaridouh force-pushed the eng/SaferCPP-Improve-smart-pointer-adoption-in-the-UIProcess-C-API-part-3-3 branch from f6d1647 to 964417a Compare June 26, 2025 01:32
@zakariaridouh zakariaridouh force-pushed the eng/SaferCPP-Improve-smart-pointer-adoption-in-the-UIProcess-C-API-part-3-3 branch from 964417a to b51b5c6 Compare June 26, 2025 07:50
@zakariaridouh zakariaridouh added the merge-queue Applied to send a pull request to merge-queue label Jun 26, 2025
…t 3/3

https://bugs.webkit.org/show_bug.cgi?id=294994
rdar://154329301

Reviewed by Chris Dumez.

Finish the last two files with failing smart pointer warnings in the UIProcess C API:

	- Source/WebKit/UIProcess/API/C/WKContext.cpp
	- Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp

* Source/WebKit/SaferCPPExpectations/UncountedCallArgsCheckerExpectations:
* Source/WebKit/UIProcess/API/C/WKContext.cpp:
(WKContextSetClient):
(WKContextSetInjectedBundleClient):
(WKContextSetDownloadClient):
(WKContextPostMessageToInjectedBundle):
(WKContextAddVisitedLink):
(WKContextSetAlwaysUsesComplexTextCodePath):
(WKContextSetDisableFontSubpixelAntialiasingForTesting):
(WKContextRegisterURLSchemeAsEmptyDocument):
(WKContextRegisterURLSchemeAsSecure):
(WKContextRegisterURLSchemeAsBypassingContentSecurityPolicy):
(WKContextRegisterURLSchemeAsCachePartitioned):
(WKContextRegisterURLSchemeAsCanDisplayOnlyIfCanRequest):
(WKContextSetDomainRelaxationForbiddenForURLScheme):
(WKContextGetGeolocationManager):
(WKContextGetNotificationManager):
(WKContextStartMemorySampler):
(WKContextStopMemorySampler):
(WKContextDisableProcessTermination):
(WKContextEnableProcessTermination):
(WKContextSetHTTPPipeliningEnabled):
(WKContextWarmInitialProcess):
(WKContextSetJavaScriptConfigurationFileEnabled):
(WKContextGarbageCollectJavaScriptObjects):
(WKContextSetJavaScriptGarbageCollectorTimerEnabled):
(WKContextSetMemoryCacheDisabled):
(WKContextSetFontAllowList):
(WKContextTerminateServiceWorkers):
(WKContextClearCurrentModifierStateForTesting):
(WKContextSetLocalhostAliases):
(WKContextSetResourceMonitorURLsForTesting):
* Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreTerminateNetworkProcess):
(WKWebsiteDataStoreGetNetworkProcessIdentifier):
(WKWebsiteDataStoreRemoveITPDataForDomain):
(WKWebsiteDataStoreDoesStatisticsDomainIDExistInDatabase):
(WKWebsiteDataStoreSetServiceWorkerFetchTimeoutForTesting):
(WKWebsiteDataStoreResetServiceWorkerFetchTimeoutForTesting):
(WKWebsiteDataStoreSetResourceLoadStatisticsEnabled):
(WKWebsiteDataStoreIsStatisticsEphemeral):
(WKWebsiteDataStoreGetResourceLoadStatisticsEnabled):
(WKWebsiteDataStoreSetResourceLoadStatisticsDebugMode):
(WKWebsiteDataStoreSyncLocalStorage):
(WKWebsiteDataStoreGetHTTPCookieStore):
(WKWebsiteDataStoreSetResourceLoadStatisticsDebugModeWithCompletionHandler):
(WKWebsiteDataStoreSetResourceLoadStatisticsPrevalentResourceForDebugMode):
(WKWebsiteDataStoreSetStatisticsLastSeen):
(WKWebsiteDataStoreSetStatisticsMergeStatistic):
(WKWebsiteDataStoreSetStatisticsExpiredStatistic):
(WKWebsiteDataStoreSetStatisticsPrevalentResource):
(WKWebsiteDataStoreSetStatisticsVeryPrevalentResource):
(WKWebsiteDataStoreDumpResourceLoadStatistics):
(WKWebsiteDataStoreIsStatisticsPrevalentResource):
(WKWebsiteDataStoreIsStatisticsVeryPrevalentResource):
(WKWebsiteDataStoreIsStatisticsRegisteredAsSubresourceUnder):
(WKWebsiteDataStoreIsStatisticsRegisteredAsSubFrameUnder):
(WKWebsiteDataStoreIsStatisticsRegisteredAsRedirectingTo):
(WKWebsiteDataStoreSetStatisticsHasHadUserInteraction):
(WKWebsiteDataStoreIsStatisticsHasHadUserInteraction):
(WKWebsiteDataStoreIsStatisticsOnlyInDatabaseOnce):
(WKWebsiteDataStoreSetStatisticsGrandfathered):
(WKWebsiteDataStoreIsStatisticsGrandfathered):
(WKWebsiteDataStoreSetStatisticsSubframeUnderTopFrameOrigin):
(WKWebsiteDataStoreSetStatisticsSubresourceUnderTopFrameOrigin):
(WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectTo):
(WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectFrom):
(WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectTo):
(WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectFrom):
(WKWebsiteDataStoreSetStatisticsCrossSiteLoadWithLinkDecoration):
(WKWebsiteDataStoreSetStatisticsTimeToLiveUserInteraction):
(WKWebsiteDataStoreStatisticsProcessStatisticsAndDataRecords):
(WKWebsiteDataStoreStatisticsUpdateCookieBlocking):
(WKWebsiteDataStoreSetResourceLoadStatisticsTimeAdvanceForTesting):
(WKWebsiteDataStoreSetStatisticsIsRunningTest):
(WKWebsiteDataStoreSetStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval):
(WKWebsiteDataStoreSetStatisticsMinimumTimeBetweenDataRecordsRemoval):
(WKWebsiteDataStoreSetStatisticsGrandfatheringTime):
(WKWebsiteDataStoreSetStatisticsMaxStatisticsEntries):
(WKWebsiteDataStoreSetStatisticsPruneEntriesDownTo):
(WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStore):
(WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
(WKWebsiteDataStoreStatisticsClearThroughWebsiteDataRemoval):
(WKWebsiteDataStoreStatisticsDeleteCookiesForTesting):
(WKWebsiteDataStoreStatisticsHasLocalStorage):
(WKWebsiteDataStoreSetStatisticsCacheMaxAgeCap):
(WKWebsiteDataStoreStatisticsHasIsolatedSession):
(WKWebsiteDataStoreSetResourceLoadStatisticsShouldDowngradeReferrerForTesting):
(WKWebsiteDataStoreSetResourceLoadStatisticsShouldBlockThirdPartyCookiesForTesting):
(WKWebsiteDataStoreSetResourceLoadStatisticsFirstPartyWebsiteDataRemovalModeForTesting):
(WKWebsiteDataStoreSetResourceLoadStatisticsToSameSiteStrictCookiesForTesting):
(WKWebsiteDataStoreSetResourceLoadStatisticsFirstPartyHostCNAMEDomainForTesting):
(WKWebsiteDataStoreSetResourceLoadStatisticsThirdPartyCNAMEDomainForTesting):
(WKWebsiteDataStoreRemoveAllFetchCaches):
(WKWebsiteDataStoreRemoveNetworkCache):
(WKWebsiteDataStoreRemoveMemoryCaches):
(WKWebsiteDataStoreRemoveFetchCacheForOrigin):
(WKWebsiteDataStoreRemoveAllIndexedDatabases):
(WKWebsiteDataStoreRemoveLocalStorage):
(WKWebsiteDataStoreRemoveAllServiceWorkerRegistrations):
(WKWebsiteDataStoreGetFetchCacheOrigins):
(WKWebsiteDataStoreGetFetchCacheSizeForOrigin):
(WKWebsiteDataStoreClearAllDeviceOrientationPermissions):
(WKWebsiteDataStoreClearPrivateClickMeasurementsThroughWebsiteDataRemoval):
(WKWebsiteDataStoreSetCacheModelSynchronouslyForTesting):
(WKWebsiteDataStoreResetQuota):
(WKWebsiteDataStoreResetStoragePersistedState):
(WKWebsiteDataStoreClearStorage):
(WKWebsiteDataStoreSetOriginQuotaRatioEnabled):
(WKWebsiteDataStoreUpdateBundleIdentifierInNetworkProcess):
(WKWebsiteDataStoreClearBundleIdentifierInNetworkProcess):
(WKWebsiteDataStoreGetAllStorageAccessEntries):
(WKWebsiteDataStoreResetResourceMonitorThrottler):

Canonical link: https://commits.webkit.org/296672@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/SaferCPP-Improve-smart-pointer-adoption-in-the-UIProcess-C-API-part-3-3 branch from b51b5c6 to 6331db8 Compare June 26, 2025 17:57
@webkit-commit-queue
Copy link
Collaborator

Committed 296672@main (6331db8): https://commits.webkit.org/296672@main

Reviewed commits have been landed. Closing PR #47206 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 6331db8 into WebKit:main Jun 26, 2025
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Bugs Unclassified bugs are placed in this component until the correct component can be determined.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants