Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 206bc9777c91c596011319fb365edfa848a5a933
      
https://github.com/WebKit/WebKit/commit/206bc9777c91c596011319fb365edfa848a5a933
  Author: Chris Dumez <[email protected]>
  Date:   2026-01-29 (Thu, 29 Jan 2026)

  Changed paths:
    M Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm
    M 
Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorXPCConnection.h
    M 
Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorXPCConnection.mm
    M Source/WTF/wtf/LoggerHelper.h
    M Source/WTF/wtf/NativePromise.h
    M Source/WTF/wtf/SchedulePair.h
    M Source/WTF/wtf/WorkQueue.h
    M Source/WTF/wtf/cf/RunLoopCF.cpp
    M Source/WTF/wtf/cocoa/Entitlements.mm
    M Source/WTF/wtf/darwin/DispatchOSObject.h
    M Source/WTF/wtf/darwin/NetworkOSObject.h
    M Source/WTF/wtf/darwin/XPCObjectPtr.h
    M Source/WebCore/platform/VideoReceiverEndpoint.h
    M Source/WebCore/platform/graphics/SourceBufferPrivate.cpp
    M 
Source/WebKit/GPUProcess/EntryPoint/Cocoa/XPCService/GPUServiceEntryPoint.mm
    M 
Source/WebKit/ModelProcess/EntryPoint/Cocoa/XPCService/ModelServiceEntryPoint.mm
    M 
Source/WebKit/NetworkProcess/Authentication/cocoa/AuthenticationManagerCocoa.mm
    M 
Source/WebKit/NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkServiceEntryPoint.mm
    M 
Source/WebKit/NetworkProcess/Notifications/Cocoa/WebPushDaemonConnectionCocoa.mm
    M Source/WebKit/NetworkProcess/Notifications/WebPushDaemonConnection.h
    M 
Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementConnection.h
    M 
Source/WebKit/NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementConnectionCocoa.mm
    M Source/WebKit/NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm
    M Source/WebKit/NetworkProcess/cocoa/LaunchServicesDatabaseObserver.h
    M Source/WebKit/NetworkProcess/cocoa/LaunchServicesDatabaseObserver.mm
    M Source/WebKit/Platform/IPC/Connection.h
    M Source/WebKit/Platform/IPC/DaemonConnection.h
    M Source/WebKit/Platform/IPC/cocoa/ConnectionCocoa.mm
    M Source/WebKit/Platform/IPC/cocoa/DaemonConnectionCocoa.mm
    M Source/WebKit/Platform/cocoa/LayerHostingContext.h
    M Source/WebKit/Platform/cocoa/LayerHostingContext.mm
    M Source/WebKit/Platform/cocoa/XPCUtilities.mm
    M Source/WebKit/Platform/ios/VideoReceiverEndpointMessage.h
    M Source/WebKit/Platform/ios/VideoReceiverEndpointMessage.mm
    M Source/WebKit/Shared/Cocoa/AuxiliaryProcessCocoa.mm
    M Source/WebKit/Shared/Cocoa/LaunchLogHook.h
    M Source/WebKit/Shared/Cocoa/LaunchLogHook.mm
    M Source/WebKit/Shared/Cocoa/XPCEndpoint.h
    M Source/WebKit/Shared/Cocoa/XPCEndpoint.mm
    M Source/WebKit/Shared/Cocoa/XPCEndpointClient.h
    M Source/WebKit/Shared/Cocoa/XPCEndpointClient.mm
    M Source/WebKit/Shared/Daemon/DaemonUtilities.h
    M Source/WebKit/Shared/Daemon/DaemonUtilities.mm
    M 
Source/WebKit/Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonConnectionSet.h
    M 
Source/WebKit/Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonConnectionSet.mm
    M 
Source/WebKit/Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonEntryPoint.mm
    M 
Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCEndpointMessages.mm
    M 
Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h
    M 
Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm
    M 
Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm
    M 
Source/WebKit/UIProcess/Authentication/cocoa/AuthenticationChallengeProxyCocoa.mm
    M Source/WebKit/UIProcess/Cocoa/AuxiliaryProcessProxyCocoa.mm
    M Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm
    M Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm
    M Source/WebKit/UIProcess/Launcher/ProcessLauncher.h
    M Source/WebKit/UIProcess/Launcher/cocoa/ExtensionProcess.h
    M Source/WebKit/UIProcess/Launcher/cocoa/ExtensionProcess.mm
    M Source/WebKit/UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm
    M Source/WebKit/UIProcess/Network/NetworkProcessProxy.h
    M Source/WebKit/UIProcess/Network/NetworkProcessProxyCocoa.mm
    M Source/WebKit/WebProcess/Plugins/PDF/PDFIncrementalLoader.mm
    M Source/WebKit/WebProcess/cocoa/LaunchServicesDatabaseManager.mm
    M Source/WebKit/webpushd/PushClientConnection.h
    M Source/WebKit/webpushd/WebPushDaemon.h
    M Source/WebKit/webpushd/WebPushDaemon.mm
    M Source/WebKit/webpushd/webpushtool/WebPushToolConnection.h
    M Source/WebKit/webpushd/webpushtool/WebPushToolConnection.mm
    M Source/WebKit/webpushd/webpushtool/WebPushToolMain.mm
    M Tools/Scripts/webkitpy/style/checkers/cpp.py
    M Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
    M Tools/TestWebKitAPI/Tests/WebKit/XPCEndpoint.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm
    M Tools/TestWebKitAPI/cocoa/DaemonTestUtilities.mm

  Log Message:
  -----------
  Reduce use of protected functions in Source/WTF
https://bugs.webkit.org/show_bug.cgi?id=306506

Reviewed by Ryosuke Niwa and Darin Adler.

Also make `protect()` work with `dispatch_*`, `nw_*` and `xpc_*` objects
so it returns an OSObjectPtr. In the process, I aligned the XPC object
support in OSObjectPtr with the support for `dispatch_*` and `nw_*`
objects, for consistency.

* Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm:
(Inspector::RemoteInspector::setupXPCConnectionIfNeeded):
* Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorXPCConnection.h:
* Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorXPCConnection.mm:
(Inspector::RemoteInspectorXPCConnection::deserializeMessage):
(Inspector::RemoteInspectorXPCConnection::sendMessage):
* Source/WTF/wtf/LoggerHelper.h:
(WTF::LoggerHelper::protectedLogger const): Deleted.
* Source/WTF/wtf/NativePromise.h:
* Source/WTF/wtf/SchedulePair.h:
(WTF::SchedulePair::runLoop const):
(WTF::SchedulePair::mode const):
(WTF::SchedulePair::protectedRunLoop const): Deleted.
(WTF::SchedulePair::protectedMode const): Deleted.
* Source/WTF/wtf/WorkQueue.h:
(WTF::WorkQueueBase::dispatchQueue const):
(WTF::WorkQueueBase::protectedDispatchQueue const): Deleted.
* Source/WTF/wtf/cf/RunLoopCF.cpp:
(WTF::RunLoop::dispatch):
* Source/WTF/wtf/cocoa/Entitlements.mm:
(WTF::hasEntitlement):
* Source/WTF/wtf/darwin/DispatchOSObject.h:
* Source/WTF/wtf/darwin/NetworkOSObject.h:
* Source/WTF/wtf/darwin/XPCObjectPtr.h:
(WTF::XPCObjectRetainTraits::retain): Deleted.
(WTF::XPCObjectRetainTraits::release): Deleted.
* Source/WebCore/platform/VideoReceiverEndpoint.h:
* Source/WebCore/platform/graphics/SourceBufferPrivate.cpp:
(WebCore::SourceBufferPrivate::addTrackBuffer):
* Source/WebKit/GPUProcess/EntryPoint/Cocoa/XPCService/GPUServiceEntryPoint.mm:
(WebKit::GPUServiceInitializerDelegate::GPUServiceInitializerDelegate):
* 
Source/WebKit/ModelProcess/EntryPoint/Cocoa/XPCService/ModelServiceEntryPoint.mm:
(WebKit::ModelServiceInitializerDelegate::ModelServiceInitializerDelegate):
* 
Source/WebKit/NetworkProcess/Authentication/cocoa/AuthenticationManagerCocoa.mm:
(WebKit::AuthenticationManager::initializeConnection):
* 
Source/WebKit/NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkServiceEntryPoint.mm:
(WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
* 
Source/WebKit/NetworkProcess/Notifications/Cocoa/WebPushDaemonConnectionCocoa.mm:
(WebKit::WebPushD::messageDictionaryFromEncoder):
* Source/WebKit/NetworkProcess/Notifications/WebPushDaemonConnection.h:
* 
Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementConnection.h:
* 
Source/WebKit/NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementConnectionCocoa.mm:
(WebKit::PCM::Connection::dictionaryFromMessage const):
* Source/WebKit/NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::write):
* Source/WebKit/NetworkProcess/cocoa/LaunchServicesDatabaseObserver.h:
* Source/WebKit/NetworkProcess/cocoa/LaunchServicesDatabaseObserver.mm:
(WebKit::LaunchServicesDatabaseObserver::LaunchServicesDatabaseObserver):
(WebKit::LaunchServicesDatabaseObserver::startObserving):
* Source/WebKit/Platform/IPC/Connection.h:
(IPC::Connection::Identifier::Identifier):
(IPC::Connection::protectedXPCConnection const):
* Source/WebKit/Platform/IPC/DaemonConnection.h:
(WebKit::Daemon::Connection::create):
(WebKit::Daemon::Connection::Connection):
* Source/WebKit/Platform/IPC/cocoa/ConnectionCocoa.mm:
(IPC::Connection::platformOpen):
(IPC::Connection::initializeSendSource):
* Source/WebKit/Platform/IPC/cocoa/DaemonConnectionCocoa.mm:
(WebKit::Daemon::ConnectionToMachService<Traits>::initializeConnectionIfNeeded 
const):
* Source/WebKit/Platform/cocoa/LayerHostingContext.h:
* Source/WebKit/Platform/cocoa/LayerHostingContext.mm:
(WebKit::LayerHostingContext::xpcRepresentation const):
(WebKit::LayerHostingContext::createHostingUpdateCoordinator):
(WebKit::LayerHostingContext::createHostingHandle):
* Source/WebKit/Platform/cocoa/XPCUtilities.mm:
(WebKit::terminateWithReason):
* Source/WebKit/Platform/ios/VideoReceiverEndpointMessage.h:
* Source/WebKit/Platform/ios/VideoReceiverEndpointMessage.mm:
(WebKit::VideoReceiverEndpointMessage::encode const):
(WebKit::VideoReceiverSwapEndpointsMessage::encode const):
* Source/WebKit/Shared/Cocoa/AuxiliaryProcessCocoa.mm:
(WebKit::AuxiliaryProcess::platformInitialize):
* Source/WebKit/Shared/Cocoa/LaunchLogHook.h:
* Source/WebKit/Shared/Cocoa/LaunchLogHook.mm:
(WebKit::LaunchLogHook::initialize):
(WebKit::LaunchLogHook::disable):
* Source/WebKit/Shared/Cocoa/XPCEndpoint.h:
* Source/WebKit/Shared/Cocoa/XPCEndpoint.mm:
(WebKit::XPCEndpoint::XPCEndpoint):
(WebKit::XPCEndpoint::sendEndpointToConnection):
(WebKit::XPCEndpoint::endpoint const):
* Source/WebKit/Shared/Cocoa/XPCEndpointClient.h:
* Source/WebKit/Shared/Cocoa/XPCEndpointClient.mm:
(WebKit::XPCEndpointClient::setEndpoint):
(WebKit::XPCEndpointClient::connection):
* Source/WebKit/Shared/Daemon/DaemonUtilities.h:
* Source/WebKit/Shared/Daemon/DaemonUtilities.mm:
(WebKit::startListeningForMachServiceConnections):
(WebKit::vectorToXPCData):
(WebKit::encoderToXPCData):
* 
Source/WebKit/Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonConnectionSet.h:
* 
Source/WebKit/Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonConnectionSet.mm:
(WebKit::PCM::DaemonConnectionSet::broadcastConsoleMessage):
* Source/WebKit/Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonEntryPoint.mm:
(WebKit::CompletionHandler<void):
(WebKit::registerScheduledActivityHandler):
* 
Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCEndpointMessages.mm:
(WebKit::handleLaunchServiceDatabaseMessage):
* 
Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
(WebKit::XPCServiceInitializer):
* 
Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::XPCServiceInitializerDelegate):
(WebKit::XPCServiceInitializerDelegate::getExtraInitializationData):
* Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceEventHandler):
(WebKit::XPCServiceMain):
* 
Source/WebKit/UIProcess/Authentication/cocoa/AuthenticationChallengeProxyCocoa.mm:
(WebKit::AuthenticationChallengeProxy::sendClientCertificateCredentialOverXpc):
* Source/WebKit/UIProcess/Cocoa/AuxiliaryProcessProxyCocoa.mm:
(WebKit::AuxiliaryProcessProxy::platformStartConnectionTerminationWatchdog):
* Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
(WebKit::PlaybackSessionManagerProxy::setVideoReceiverEndpoint):
(WebKit::PlaybackSessionManagerProxy::swapVideoReceiverEndpoints):
* Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm:
(WebKit::VideoPresentationManagerProxy::setVideoLayerFrame):
* Source/WebKit/UIProcess/Launcher/ProcessLauncher.h:
* Source/WebKit/UIProcess/Launcher/cocoa/ExtensionProcess.h:
* Source/WebKit/UIProcess/Launcher/cocoa/ExtensionProcess.mm:
(WebKit::ExtensionProcess::makeLibXPCConnection const):
* Source/WebKit/UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm:
(WebKit::ProcessLauncher::launchProcess):
(WebKit::ProcessLauncher::finishLaunchingProcess):
* Source/WebKit/UIProcess/Network/NetworkProcessProxy.h:
* Source/WebKit/UIProcess/Network/NetworkProcessProxyCocoa.mm:
(WebKit::NetworkProcessProxy::sendXPCEndpointToProcess):
* Source/WebKit/WebProcess/Plugins/PDF/PDFIncrementalLoader.mm:
(WebKit::PDFIncrementalLoader::threadEntry):
* Source/WebKit/WebProcess/cocoa/LaunchServicesDatabaseManager.mm:
(WebKit::LaunchServicesDatabaseManager::handleEvent):
(WebKit::LaunchServicesDatabaseManager::didConnect):
* Source/WebKit/webpushd/PushClientConnection.h:
* Source/WebKit/webpushd/WebPushDaemon.h:
* Source/WebKit/webpushd/WebPushDaemon.mm:
(WebPushD::tryCloseRequestConnection):
(WebPushD::WebPushDaemon::connectionEventHandler):
* Source/WebKit/webpushd/webpushtool/WebPushToolConnection.h:
* Source/WebKit/webpushd/webpushtool/WebPushToolConnection.mm:
(WebPushTool::Connection::connectToService):
(WebPushTool::messageDictionaryFromEncoder):
* Source/WebKit/webpushd/webpushtool/WebPushToolMain.mm:
(registerDaemonWithLaunchD):
* Tools/Scripts/webkitpy/style/checkers/cpp.py:
(check_wtf_xpc_object_ptr):
* Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py:
(WebKitStyleTest.test_wtf_xpc_object_ptr):
* Tools/TestWebKitAPI/Tests/WebKit/XPCEndpoint.mm:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::attemptConnectionInProcessWithoutEntitlement):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(TestWebKitAPI::WebPushXPCConnectionMessageSender::messageDictionaryFromEncoder 
const):
(TestWebKitAPI::createAndConfigureConnectionToService):
(TestWebKitAPI::TEST(WebPushD, BasicCommunication)):
* Tools/TestWebKitAPI/cocoa/DaemonTestUtilities.mm:
(TestWebKitAPI::convertArrayToXPC):
(TestWebKitAPI::convertDictionaryToXPC):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to