Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 16ffde07240e6edc23df072d113cb0a60f43c883
      
https://github.com/WebKit/WebKit/commit/16ffde07240e6edc23df072d113cb0a60f43c883
  Author: Frédéric Wang <[email protected]>
  Date:   2025-09-09 (Tue, 09 Sep 2025)

  Changed paths:
    M Source/WTF/SaferCPPExpectations/UnretainedCallArgsCheckerExpectations
    M Source/WTF/WTF.xcodeproj/project.pbxproj
    M Source/WTF/wtf/CMakeLists.txt
    M Source/WTF/wtf/PlatformMac.cmake
    M Source/WTF/wtf/cf/LanguageCF.cpp
    A Source/WTF/wtf/cf/NotificationCenterCF.h
    M Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp
    M Source/WebCore/platform/cf/MainThreadSharedTimerCF.cpp
    M Source/WebCore/platform/cocoa/EffectiveRateChangedListener.mm
    M Source/WebCore/platform/cocoa/ParentalControlsURLFilter.mm
    M Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
    M Source/WebCore/platform/text/cocoa/LocalizedDateCache.mm
    M Source/WebKit/SaferCPPExpectations/UnretainedCallArgsCheckerExpectations
    M Source/WebKit/UIProcess/API/Cocoa/_WKSystemPreferences.mm
    M Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
    M Source/WebKit/UIProcess/WebProcessPool.h
    M Source/WebKit/UIProcess/ios/WKWebGeolocationPolicyDeciderIOS.mm
    M Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm

  Log Message:
  -----------
  Fix false positive warnings with global CFNotificationCenters
https://bugs.webkit.org/show_bug.cgi?id=295778

Reviewed by Darin Adler and Ryosuke Niwa.

Introduce "*Singleton" versions of the following functions to turn off clang 
safer cpp warnings:

CFNotificationCenterGetDarwinNotifyCenter()
CFNotificationCenterGetDistributedCenter()
CFNotificationCenterGetLocalCenter()

* Source/WTF/WTF.xcodeproj/project.pbxproj: Add header.
* Source/WTF/wtf/CMakeLists.txt: Ditto.
* Source/WTF/wtf/PlatformMac.cmake: Ditto.
* Source/WTF/wtf/cf/LanguageCF.cpp:
(WTF::listenForLanguageChangeNotifications): Use singleton version.
* Source/WTF/wtf/cf/NotificationCenterCF.h: Added.
(WTF::CFNotificationCenterGetDarwinNotifyCenterSingleton): Define singleton 
version.
(WTF::CFNotificationCenterGetLocalCenterSingleton): Ditto.
(WTF::CFNotificationCenterGetDistributedCenterSingleton): Ditto.
* Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp: Use singleton version.
(WebCore::CaptionUserPreferencesMediaAF::~CaptionUserPreferencesMediaAF): Ditto.
(WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges):
 Ditto.
* Source/WebCore/platform/cf/MainThreadSharedTimerCF.cpp:
(WebCore::setupPowerObserver): Ditto.
* Source/WebCore/platform/cocoa/EffectiveRateChangedListener.mm:
(WebCore::EffectiveRateChangedListener::EffectiveRateChangedListener): Ditto.
(WebCore::EffectiveRateChangedListener::stop): Ditto.
* Source/WebCore/platform/cocoa/ParentalControlsURLFilter.mm:
(WebCore::registerNotificationForWebContentFilterTypeChange): Ditto.
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontCache::platformInit): Ditto.
* Source/WebCore/platform/text/cocoa/LocalizedDateCache.mm:
(WebCore::LocalizedDateCache::LocalizedDateCache): Ditto.
(WebCore::LocalizedDateCache::~LocalizedDateCache): Ditto.
* Source/WebKit/SaferCPPExpectations/UnretainedCallArgsCheckerExpectations: 
Remove files with warnings fixed.
* Source/WebKit/UIProcess/API/Cocoa/_WKSystemPreferences.mm:
(+[_WKSystemPreferences setCaptivePortalModeEnabled:]): Ditto.
(+[_WKSystemPreferences setCaptivePortalModeIgnored:ignore:]): Ditto.
* Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::registerNotificationObservers): Ditto.
(WebKit::WebProcessPool::unregisterNotificationObservers): Ditto.
(WebKit::WebProcessPool::registerHighDynamicRangeChangeCallback): Ditto.
* Source/WebKit/UIProcess/WebProcessPool.h:
* Source/WebKit/UIProcess/ios/WKWebGeolocationPolicyDeciderIOS.mm:
(-[WKWebGeolocationPolicyDecider init]): Ditto.
(-[WKWebGeolocationPolicyDecider dealloc]): Ditto.
* Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::colorPreferencesDidChange): Ditto.
(WebKit::WebProcess::dispatchSimulatedNotificationsForPreferenceChange): Ditto.
* Source/WTF/SaferCPPExpectations/UnretainedCallArgsCheckerExpectations: Remove 
files with warning fixed.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to