[webkit-changes] [WebKit/WebKit] 1b1dcd: Make WTF::Identified work with strongly typed iden...

Chris Dumez noreply at github.com
Wed Mar 6 08:19:20 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1b1dcd66b5d65444ff9e2c75ef940712ba2c31e1
      https://github.com/WebKit/WebKit/commit/1b1dcd66b5d65444ff9e2c75ef940712ba2c31e1
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2024-03-06 (Wed, 06 Mar 2024)

  Changed paths:
    M Source/WTF/wtf/Identified.h
    M Source/WebCore/Modules/encryptedmedia/MediaKeySystemRequest.cpp
    M Source/WebCore/Modules/encryptedmedia/MediaKeySystemRequest.h
    M Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h
    M Source/WebCore/Modules/mediastream/UserMediaRequest.cpp
    M Source/WebCore/Modules/mediastream/UserMediaRequest.h
    M Source/WebCore/Modules/speech/SpeechRecognitionConnectionClient.h
    M Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp
    M Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h
    M Source/WebCore/dom/BroadcastChannel.cpp
    M Source/WebCore/html/HTMLMediaElement.h
    M Source/WebCore/workers/service/background-fetch/BackgroundFetch.cpp
    M Source/WebCore/workers/service/background-fetch/BackgroundFetch.h
    M Source/WebCore/workers/service/server/SWServerRegistration.cpp
    M Source/WebCore/workers/service/server/SWServerRegistration.h
    M Source/WebCore/workers/service/server/SWServerToContextConnection.cpp
    M Source/WebCore/workers/service/server/SWServerToContextConnection.h
    M Source/WebCore/workers/shared/SharedWorker.cpp
    M Source/WebCore/workers/shared/SharedWorker.h
    M Source/WebKit/NetworkProcess/SharedWorker/WebSharedWorker.cpp
    M Source/WebKit/NetworkProcess/SharedWorker/WebSharedWorker.h
    M Source/WebKit/NetworkProcess/storage/CacheStorageCache.cpp
    M Source/WebKit/NetworkProcess/storage/CacheStorageCache.h
    M Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.cpp
    M Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.h
    M Source/WebKit/NetworkProcess/storage/StorageAreaBase.cpp
    M Source/WebKit/NetworkProcess/storage/StorageAreaBase.h
    M Source/WebKit/NetworkProcess/webtransport/NetworkTransportSession.cpp
    M Source/WebKit/NetworkProcess/webtransport/NetworkTransportSession.h
    M Source/WebKit/Shared/mac/MediaFormatReader/MediaSampleCursor.h
    M Source/WebKit/UIProcess/API/APIUserScript.h
    M Source/WebKit/UIProcess/API/APIUserStyleSheet.h
    M Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp
    M Source/WebKit/UIProcess/DrawingAreaProxy.cpp
    M Source/WebKit/UIProcess/DrawingAreaProxy.h
    M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionControllerCocoa.mm
    M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionTabCocoa.mm
    M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionWindowCocoa.mm
    M Source/WebKit/UIProcess/Extensions/WebExtensionContext.cpp
    M Source/WebKit/UIProcess/Extensions/WebExtensionContext.h
    M Source/WebKit/UIProcess/Extensions/WebExtensionController.cpp
    M Source/WebKit/UIProcess/Extensions/WebExtensionController.h
    M Source/WebKit/UIProcess/Extensions/WebExtensionTab.h
    M Source/WebKit/UIProcess/Extensions/WebExtensionWindow.h
    M Source/WebKit/UIProcess/Notifications/WebNotification.cpp
    M Source/WebKit/UIProcess/Notifications/WebNotification.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm
    M Source/WebKit/UIProcess/UserContent/WebScriptMessageHandler.h
    M Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.cpp
    M Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.h
    M Source/WebKit/UIProcess/VisitedLinkStore.cpp
    M Source/WebKit/UIProcess/VisitedLinkStore.h
    M Source/WebKit/UIProcess/WebURLSchemeHandler.cpp
    M Source/WebKit/UIProcess/WebURLSchemeHandler.h
    M Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferSetProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferSetProxy.h
    M Source/WebKit/WebProcess/GPU/media/RemoteAudioHardwareListener.cpp
    M Source/WebKit/WebProcess/GPU/media/RemoteAudioHardwareListener.h
    M Source/WebKit/WebProcess/GPU/media/RemoteRemoteCommandListener.cpp
    M Source/WebKit/WebProcess/GPU/media/RemoteRemoteCommandListener.h
    M Source/WebKit/WebProcess/GPU/webrtc/AudioMediaStreamTrackRendererInternalUnitManager.cpp
    M Source/WebKit/WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp
    M Source/WebKit/WebProcess/GPU/webrtc/MediaRecorderPrivate.h
    M Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp
    M Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h
    M Source/WebKit/WebProcess/Network/WebSocketChannel.cpp
    M Source/WebKit/WebProcess/Network/webrtc/LibWebRTCResolver.cpp
    M Source/WebKit/WebProcess/Network/webrtc/LibWebRTCResolver.h
    M Source/WebKit/WebProcess/Network/webrtc/LibWebRTCSocket.cpp
    M Source/WebKit/WebProcess/Network/webrtc/LibWebRTCSocket.h
    M Source/WebKit/WebProcess/Plugins/PDF/PDFIncrementalLoader.mm
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.mm
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
    M Source/WebKit/WebProcess/WebStorage/StorageAreaImpl.cpp
    M Source/WebKit/WebProcess/WebStorage/StorageAreaImpl.h
    M Source/WebKit/WebProcess/WebStorage/StorageAreaMap.cpp
    M Source/WebKit/WebProcess/WebStorage/StorageAreaMap.h
    M Source/WebKit/webpushd/PushClientConnection.h

  Log Message:
  -----------
  Make WTF::Identified work with strongly typed identifiers
https://bugs.webkit.org/show_bug.cgi?id=270560

Reviewed by Darin Adler.

Make WTF::Identified work with strongly typed identifiers instead of uint64_t.
Keep existing code that was using the legacy WTF::Identified working by having
it subclass WTF::LegacyIdentified instead. We should eventually port those to
the new WTF::Identified.

Also adopt WTF::Identified more broadly to reduce boilerplate code in the code
base.

* Source/WTF/wtf/Identified.h:
(WTF::IdentifiedBase::identifier const):
(WTF::Identified::Identified):
(WTF::LegacyIdentified::LegacyIdentified):
(WTF::LegacyThreadSafeIdentified::LegacyThreadSafeIdentified):
(WTF::UUIDIdentified::UUIDIdentified):
(WTF::Identified::generateIdentifier): Deleted.
(WTF::ThreadSafeIdentified::ThreadSafeIdentified): Deleted.
(WTF::ThreadSafeIdentified::generateIdentifier): Deleted.
* Source/WebCore/Modules/encryptedmedia/MediaKeySystemRequest.cpp:
(WebCore::MediaKeySystemRequest::MediaKeySystemRequest):
* Source/WebCore/Modules/encryptedmedia/MediaKeySystemRequest.h:
(WebCore::MediaKeySystemRequest::setAllowCallback):
(WebCore::MediaKeySystemRequest::identifier const): Deleted.
* Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
* Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::UserMediaRequest):
* Source/WebCore/Modules/mediastream/UserMediaRequest.h:
(WebCore::UserMediaRequest::identifier const): Deleted.
* Source/WebCore/Modules/speech/SpeechRecognitionConnectionClient.h:
(WebCore::SpeechRecognitionConnectionClient::SpeechRecognitionConnectionClient): Deleted.
(WebCore::SpeechRecognitionConnectionClient::identifier const): Deleted.
* Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp:
(WebCore::ThreadableWebSocketChannel::ThreadableWebSocketChannel): Deleted.
* Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h:
(WebCore::ThreadableWebSocketChannel::identifier const): Deleted.
* Source/WebCore/dom/BroadcastChannel.cpp:
(WebCore::BroadcastChannel::MainThreadBridge::name const):
(WebCore::BroadcastChannel::MainThreadBridge::MainThreadBridge):
(WebCore::BroadcastChannel::MainThreadBridge::registerChannel):
(WebCore::BroadcastChannel::MainThreadBridge::unregisterChannel):
(WebCore::BroadcastChannel::MainThreadBridge::postMessage):
(WebCore::BroadcastChannel::MainThreadBridge::identifier const): Deleted.
* Source/WebCore/html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::identifier const): Deleted.
* Source/WebCore/workers/service/background-fetch/BackgroundFetch.cpp:
(WebCore::BackgroundFetch::Record::Record):
(WebCore::BackgroundFetch::Record::information const):
* Source/WebCore/workers/service/background-fetch/BackgroundFetch.h:
* Source/WebCore/workers/service/server/SWServerRegistration.cpp:
(WebCore::SWServerRegistration::SWServerRegistration):
(WebCore::generateServiceWorkerRegistrationIdentifier): Deleted.
* Source/WebCore/workers/service/server/SWServerRegistration.h:
(WebCore::SWServerRegistration::key const):
(WebCore::SWServerRegistration::identifier const): Deleted.
* Source/WebCore/workers/service/server/SWServerToContextConnection.cpp:
(WebCore::SWServerToContextConnection::SWServerToContextConnection):
(WebCore::generateServerToContextConnectionIdentifier): Deleted.
* Source/WebCore/workers/service/server/SWServerToContextConnection.h:
* Source/WebCore/workers/shared/SharedWorker.cpp:
(WebCore::SharedWorker::SharedWorker):
(WebCore::SharedWorker::~SharedWorker):
(WebCore::SharedWorker::stop):
(WebCore::SharedWorker::suspend):
(WebCore::SharedWorker::resume):
* Source/WebCore/workers/shared/SharedWorker.h:
* Source/WebKit/NetworkProcess/SharedWorker/WebSharedWorker.cpp:
(WebKit::WebSharedWorker::WebSharedWorker):
(WebKit::WebSharedWorker::~WebSharedWorker):
* Source/WebKit/NetworkProcess/SharedWorker/WebSharedWorker.h:
(WebKit::WebSharedWorker::identifier const): Deleted.
* Source/WebKit/NetworkProcess/storage/CacheStorageCache.cpp:
(WebKit::CacheStorageCache::CacheStorageCache):
(WebKit::CacheStorageCache::open):
* Source/WebKit/NetworkProcess/storage/CacheStorageCache.h:
(WebKit::CacheStorageCache::identifier const): Deleted.
* Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.cpp:
(WebKit::FileSystemStorageHandle::FileSystemStorageHandle):
(WebKit::FileSystemStorageHandle::createSyncAccessHandle):
(WebKit::FileSystemStorageHandle::closeSyncAccessHandle):
* Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.h:
(WebKit::FileSystemStorageHandle::identifier const): Deleted.
* Source/WebKit/NetworkProcess/storage/StorageAreaBase.cpp:
(WebKit::StorageAreaBase::StorageAreaBase):
* Source/WebKit/NetworkProcess/storage/StorageAreaBase.h:
(WebKit::StorageAreaBase::identifier const): Deleted.
* Source/WebKit/NetworkProcess/webtransport/NetworkTransportSession.cpp:
(WebKit::NetworkTransportSession::NetworkTransportSession):
(WebKit::NetworkTransportSession::messageSenderDestinationID const):
* Source/WebKit/NetworkProcess/webtransport/NetworkTransportSession.h:
(WebKit::NetworkTransportSession::identifier const): Deleted.
* Source/WebKit/Shared/mac/MediaFormatReader/MediaSampleCursor.h:
* Source/WebKit/UIProcess/API/APIUserScript.h:
* Source/WebKit/UIProcess/API/APIUserStyleSheet.h:
* Source/WebKit/UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::DrawingAreaProxy):
(WebKit::DrawingAreaProxy::startReceivingMessages):
(WebKit::DrawingAreaProxy::stopReceivingMessages):
* Source/WebKit/UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::type const):
(WebKit::DrawingAreaProxy::identifier const): Deleted.
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionControllerCocoa.mm:
(WebKit::WebExtensionController::load):
(WebKit::WebExtensionController::unload):
(WebKit::WebExtensionController::addProcessPool):
(WebKit::WebExtensionController::removeProcessPool):
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionTabCocoa.mm:
(WebKit::WebExtensionTab::WebExtensionTab):
(WebKit::WebExtensionTab::operator== const):
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionWindowCocoa.mm:
(WebKit::WebExtensionWindow::WebExtensionWindow):
(WebKit::WebExtensionWindow::operator== const):
* Source/WebKit/UIProcess/Extensions/WebExtensionContext.cpp:
(WebKit::WebExtensionContext::WebExtensionContext):
* Source/WebKit/UIProcess/Extensions/WebExtensionContext.h:
(WebKit::WebExtensionContext::identifier const): Deleted.
* Source/WebKit/UIProcess/Extensions/WebExtensionController.cpp:
(WebKit::WebExtensionController::WebExtensionController):
* Source/WebKit/UIProcess/Extensions/WebExtensionController.h:
(WebKit::WebExtensionController::configuration const):
(WebKit::WebExtensionController::identifier const): Deleted.
* Source/WebKit/UIProcess/Extensions/WebExtensionTab.h:
(WebKit::WebExtensionTab::identifier const): Deleted.
* Source/WebKit/UIProcess/Extensions/WebExtensionWindow.h:
(WebKit::WebExtensionWindow::identifier const): Deleted.
* Source/WebKit/UIProcess/Notifications/WebNotification.cpp:
(WebKit::WebNotification::WebNotification):
* Source/WebKit/UIProcess/Notifications/WebNotification.h:
(WebKit::WebNotification::identifier const): Deleted.
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
(WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):
* Source/WebKit/UIProcess/UserContent/WebScriptMessageHandler.h:
* Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
(WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
* Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.h:
(WebKit::WebUserContentControllerProxy::identifier const): Deleted.
* Source/WebKit/UIProcess/VisitedLinkStore.cpp:
(WebKit::VisitedLinkStore::VisitedLinkStore):
* Source/WebKit/UIProcess/VisitedLinkStore.h:
* Source/WebKit/UIProcess/WebURLSchemeHandler.cpp:
(WebKit::WebURLSchemeHandler::WebURLSchemeHandler): Deleted.
* Source/WebKit/UIProcess/WebURLSchemeHandler.h:
(WebKit::WebURLSchemeHandler::identifier const): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferSetProxy.cpp:
(WebKit::RemoteImageBufferSetProxy::send):
(WebKit::RemoteImageBufferSetProxy::sendSync):
(WebKit::RemoteImageBufferSetProxy::RemoteImageBufferSetProxy):
(WebKit::RemoteImageBufferSetProxy::didPrepareForDisplay):
(WebKit::RemoteImageBufferSetProxy::close):
(WebKit::RemoteImageBufferSetProxy::flushFrontBufferAsync):
(WebKit::RemoteImageBufferSetProxy::willPrepareForDisplay):
(WebKit::RemoteImageBufferSetProxy::remoteBufferSetWasDestroyed):
* Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferSetProxy.h:
(WebKit::RemoteImageBufferSetProxy::identifier const): Deleted.
* Source/WebKit/WebProcess/GPU/media/RemoteAudioHardwareListener.cpp:
(WebKit::RemoteAudioHardwareListener::RemoteAudioHardwareListener):
(WebKit::RemoteAudioHardwareListener::~RemoteAudioHardwareListener):
* Source/WebKit/WebProcess/GPU/media/RemoteAudioHardwareListener.h:
* Source/WebKit/WebProcess/GPU/media/RemoteRemoteCommandListener.cpp:
(WebKit::RemoteRemoteCommandListener::RemoteRemoteCommandListener):
(WebKit::RemoteRemoteCommandListener::~RemoteRemoteCommandListener):
(WebKit::RemoteRemoteCommandListener::ensureGPUProcessConnection):
(WebKit::RemoteRemoteCommandListener::updateSupportedCommands):
* Source/WebKit/WebProcess/GPU/media/RemoteRemoteCommandListener.h:
* Source/WebKit/WebProcess/GPU/webrtc/AudioMediaStreamTrackRendererInternalUnitManager.cpp:
(WebKit::AudioMediaStreamTrackRendererInternalUnitManager::Proxy::Proxy):
(WebKit::AudioMediaStreamTrackRendererInternalUnitManager::Proxy::~Proxy):
(WebKit::AudioMediaStreamTrackRendererInternalUnitManager::Proxy::createRemoteUnit):
(WebKit::AudioMediaStreamTrackRendererInternalUnitManager::Proxy::start):
(WebKit::AudioMediaStreamTrackRendererInternalUnitManager::Proxy::stop):
(WebKit::AudioMediaStreamTrackRendererInternalUnitManager::Proxy::setAudioOutputDevice):
* Source/WebKit/WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:
(WebKit::MediaRecorderPrivate::MediaRecorderPrivate):
(WebKit::MediaRecorderPrivate::startRecording):
(WebKit::MediaRecorderPrivate::~MediaRecorderPrivate):
(WebKit::MediaRecorderPrivate::videoFrameAvailable):
(WebKit::MediaRecorderPrivate::audioSamplesAvailable):
(WebKit::MediaRecorderPrivate::fetchData):
(WebKit::MediaRecorderPrivate::stopRecording):
(WebKit::MediaRecorderPrivate::pauseRecording):
(WebKit::MediaRecorderPrivate::resumeRecording):
* Source/WebKit/WebProcess/GPU/webrtc/MediaRecorderPrivate.h:
* Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:
(WebKit::SampleBufferDisplayLayer::SampleBufferDisplayLayer):
(WebKit::SampleBufferDisplayLayer::initialize):
(WebKit::SampleBufferDisplayLayer::setLogIdentifier):
(WebKit::SampleBufferDisplayLayer::~SampleBufferDisplayLayer):
(WebKit::SampleBufferDisplayLayer::updateDisplayMode):
(WebKit::SampleBufferDisplayLayer::updateBoundsAndPosition):
(WebKit::SampleBufferDisplayLayer::flush):
(WebKit::SampleBufferDisplayLayer::flushAndRemoveImage):
(WebKit::SampleBufferDisplayLayer::play):
(WebKit::SampleBufferDisplayLayer::pause):
(WebKit::SampleBufferDisplayLayer::enqueueBlackFrameFrom):
(WebKit::SampleBufferDisplayLayer::enqueueVideoFrame):
(WebKit::SampleBufferDisplayLayer::clearVideoFrames):
(WebKit::SampleBufferDisplayLayer::setShouldMaintainAspectRatio):
* Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h:
* Source/WebKit/WebProcess/Network/WebSocketChannel.cpp:
(WebKit::WebSocketChannel::messageSenderDestinationID const):
(WebKit::WebSocketChannel::connect):
* Source/WebKit/WebProcess/Network/webrtc/LibWebRTCResolver.cpp:
(WebKit::LibWebRTCResolver::~LibWebRTCResolver):
(WebKit::LibWebRTCResolver::start):
* Source/WebKit/WebProcess/Network/webrtc/LibWebRTCResolver.h:
* Source/WebKit/WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
(WebKit::LibWebRTCSocket::LibWebRTCSocket):
(WebKit::LibWebRTCSocket::SendTo):
(WebKit::LibWebRTCSocket::Close):
(WebKit::LibWebRTCSocket::SetOption):
(WebKit::LibWebRTCSocket::suspend):
* Source/WebKit/WebProcess/Network/webrtc/LibWebRTCSocket.h:
* Source/WebKit/WebProcess/Plugins/PDF/PDFIncrementalLoader.mm:
* Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::handleContextMenuEvent):
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h:
(WebKit::PDFPluginBase::identifier const): Deleted.
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.mm:
(WebKit::PDFPluginBase::PDFPluginBase):
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::handleContextMenuEvent):
* Source/WebKit/WebProcess/WebStorage/StorageAreaImpl.cpp:
(WebKit::StorageAreaImpl::StorageAreaImpl):
* Source/WebKit/WebProcess/WebStorage/StorageAreaImpl.h:
* Source/WebKit/WebProcess/WebStorage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::StorageAreaMap):
(WebKit::StorageAreaMap::sendConnectMessage):
* Source/WebKit/WebProcess/WebStorage/StorageAreaMap.h:
* Source/WebKit/webpushd/PushClientConnection.h:

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



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


More information about the webkit-changes mailing list