Title: [292280] trunk/Source/WebKit
Revision
292280
Author
commit-qu...@webkit.org
Date
2022-04-04 00:29:46 -0700 (Mon, 04 Apr 2022)

Log Message

IPC::StreamServerConnectionBase has only one subclass, it should be removed
https://bugs.webkit.org/show_bug.cgi?id=238676

Patch by Kimmo Kinnunen <kkinnu...@apple.com> on 2022-04-04
Reviewed by Wenson Hsieh.

Merge IPC::StreamServerConnectionBase and IPC::StreamServerConnection.
The base was useful when the concrete classes were templates per message receiver.
The concrete class was changed to use multiple message receivers, and the templating
was replaced with id lookup.

No new tests, refactor.

* GPUProcess/graphics/RemoteDisplayListRecorder.h:
* GPUProcess/graphics/RemoteGraphicsContextGL.h:
* GPUProcess/graphics/RemoteRenderingBackend.h:
* GPUProcess/graphics/WebGPU/RemoteAdapter.h:
* GPUProcess/graphics/WebGPU/RemoteBindGroup.h:
* GPUProcess/graphics/WebGPU/RemoteBindGroupLayout.h:
* GPUProcess/graphics/WebGPU/RemoteBuffer.h:
* GPUProcess/graphics/WebGPU/RemoteCommandBuffer.h:
* GPUProcess/graphics/WebGPU/RemoteCommandEncoder.h:
* GPUProcess/graphics/WebGPU/RemoteComputePassEncoder.h:
* GPUProcess/graphics/WebGPU/RemoteComputePipeline.h:
* GPUProcess/graphics/WebGPU/RemoteDevice.h:
* GPUProcess/graphics/WebGPU/RemoteExternalTexture.h:
* GPUProcess/graphics/WebGPU/RemoteGPU.h:
* GPUProcess/graphics/WebGPU/RemotePipelineLayout.h:
* GPUProcess/graphics/WebGPU/RemoteQuerySet.h:
* GPUProcess/graphics/WebGPU/RemoteQueue.h:
* GPUProcess/graphics/WebGPU/RemoteRenderBundle.h:
* GPUProcess/graphics/WebGPU/RemoteRenderBundleEncoder.h:
* GPUProcess/graphics/WebGPU/RemoteRenderPassEncoder.h:
* GPUProcess/graphics/WebGPU/RemoteRenderPipeline.h:
* GPUProcess/graphics/WebGPU/RemoteSampler.h:
* GPUProcess/graphics/WebGPU/RemoteShaderModule.h:
* GPUProcess/graphics/WebGPU/RemoteTexture.h:
* GPUProcess/graphics/WebGPU/RemoteTextureView.h:
* Platform/IPC/HandleMessage.h:
(IPC::handleMessageSynchronous):
* Platform/IPC/StreamConnectionWorkQueue.cpp:
(IPC::StreamConnectionWorkQueue::addStreamConnection):
(IPC::StreamConnectionWorkQueue::removeStreamConnection):
(IPC::StreamConnectionWorkQueue::processStreams):
* Platform/IPC/StreamConnectionWorkQueue.h:
* Platform/IPC/StreamMessageReceiver.h:
* Platform/IPC/StreamServerConnection.cpp:
(IPC::StreamServerConnection::StreamServerConnection):
(IPC::StreamServerConnection::startReceivingMessages):
(IPC::StreamServerConnection::stopReceivingMessages):
(IPC::StreamServerConnection::enqueueMessage):
(IPC::StreamServerConnection::tryAcquire):
(IPC::StreamServerConnection::acquireAll):
(IPC::StreamServerConnection::release):
(IPC::StreamServerConnection::releaseAll):
(IPC::StreamServerConnection::alignedSpan):
(IPC::StreamServerConnection::size):
(IPC::StreamServerConnection::clampedLimit const):
(IPC::StreamServerConnection::dispatchStreamMessages):
* Platform/IPC/StreamServerConnection.h:
(IPC::StreamServerConnection::sendSyncReply):
* Scripts/webkit/messages.py:
(generate_message_handler):
* Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp:
(WebKit::TestWithStream::didReceiveStreamMessage):
* Shared/IPCStreamTester.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (292279 => 292280)


--- trunk/Source/WebKit/ChangeLog	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/ChangeLog	2022-04-04 07:29:46 UTC (rev 292280)
@@ -1,3 +1,71 @@
+2022-04-04  Kimmo Kinnunen  <kkinnu...@apple.com>
+
+        IPC::StreamServerConnectionBase has only one subclass, it should be removed
+        https://bugs.webkit.org/show_bug.cgi?id=238676
+
+        Reviewed by Wenson Hsieh.
+
+        Merge IPC::StreamServerConnectionBase and IPC::StreamServerConnection.
+        The base was useful when the concrete classes were templates per message receiver.
+        The concrete class was changed to use multiple message receivers, and the templating
+        was replaced with id lookup.
+
+        No new tests, refactor.
+
+        * GPUProcess/graphics/RemoteDisplayListRecorder.h:
+        * GPUProcess/graphics/RemoteGraphicsContextGL.h:
+        * GPUProcess/graphics/RemoteRenderingBackend.h:
+        * GPUProcess/graphics/WebGPU/RemoteAdapter.h:
+        * GPUProcess/graphics/WebGPU/RemoteBindGroup.h:
+        * GPUProcess/graphics/WebGPU/RemoteBindGroupLayout.h:
+        * GPUProcess/graphics/WebGPU/RemoteBuffer.h:
+        * GPUProcess/graphics/WebGPU/RemoteCommandBuffer.h:
+        * GPUProcess/graphics/WebGPU/RemoteCommandEncoder.h:
+        * GPUProcess/graphics/WebGPU/RemoteComputePassEncoder.h:
+        * GPUProcess/graphics/WebGPU/RemoteComputePipeline.h:
+        * GPUProcess/graphics/WebGPU/RemoteDevice.h:
+        * GPUProcess/graphics/WebGPU/RemoteExternalTexture.h:
+        * GPUProcess/graphics/WebGPU/RemoteGPU.h:
+        * GPUProcess/graphics/WebGPU/RemotePipelineLayout.h:
+        * GPUProcess/graphics/WebGPU/RemoteQuerySet.h:
+        * GPUProcess/graphics/WebGPU/RemoteQueue.h:
+        * GPUProcess/graphics/WebGPU/RemoteRenderBundle.h:
+        * GPUProcess/graphics/WebGPU/RemoteRenderBundleEncoder.h:
+        * GPUProcess/graphics/WebGPU/RemoteRenderPassEncoder.h:
+        * GPUProcess/graphics/WebGPU/RemoteRenderPipeline.h:
+        * GPUProcess/graphics/WebGPU/RemoteSampler.h:
+        * GPUProcess/graphics/WebGPU/RemoteShaderModule.h:
+        * GPUProcess/graphics/WebGPU/RemoteTexture.h:
+        * GPUProcess/graphics/WebGPU/RemoteTextureView.h:
+        * Platform/IPC/HandleMessage.h:
+        (IPC::handleMessageSynchronous):
+        * Platform/IPC/StreamConnectionWorkQueue.cpp:
+        (IPC::StreamConnectionWorkQueue::addStreamConnection):
+        (IPC::StreamConnectionWorkQueue::removeStreamConnection):
+        (IPC::StreamConnectionWorkQueue::processStreams):
+        * Platform/IPC/StreamConnectionWorkQueue.h:
+        * Platform/IPC/StreamMessageReceiver.h:
+        * Platform/IPC/StreamServerConnection.cpp:
+        (IPC::StreamServerConnection::StreamServerConnection):
+        (IPC::StreamServerConnection::startReceivingMessages):
+        (IPC::StreamServerConnection::stopReceivingMessages):
+        (IPC::StreamServerConnection::enqueueMessage):
+        (IPC::StreamServerConnection::tryAcquire):
+        (IPC::StreamServerConnection::acquireAll):
+        (IPC::StreamServerConnection::release):
+        (IPC::StreamServerConnection::releaseAll):
+        (IPC::StreamServerConnection::alignedSpan):
+        (IPC::StreamServerConnection::size):
+        (IPC::StreamServerConnection::clampedLimit const):
+        (IPC::StreamServerConnection::dispatchStreamMessages):
+        * Platform/IPC/StreamServerConnection.h:
+        (IPC::StreamServerConnection::sendSyncReply):
+        * Scripts/webkit/messages.py:
+        (generate_message_handler):
+        * Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp:
+        (WebKit::TestWithStream::didReceiveStreamMessage):
+        * Shared/IPCStreamTester.h:
+
 2022-04-03  Tim Horton  <timothy_hor...@apple.com>
 
         _WKDataTask doesn't work in macCatalyst

Modified: trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -151,7 +151,7 @@
     }
 
     void startListeningForIPC();
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     WeakPtr<WebCore::ImageBuffer> m_imageBuffer;
     QualifiedRenderingResourceIdentifier m_imageBufferIdentifier;

Modified: trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -82,7 +82,7 @@
     ~RemoteGraphicsContextGL() override;
     void stopListeningForIPC(Ref<RemoteGraphicsContextGL>&& refFromConnection);
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 #if PLATFORM(MAC)
     void displayWasReconfigured();
 #endif

Modified: trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -81,7 +81,7 @@
 
     RemoteResourceCache& remoteResourceCache() { return m_remoteResourceCache; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     // Messages to be sent.
     void didCreateImageBufferBackend(ImageBufferBackendHandle, QualifiedRenderingResourceIdentifier, RemoteDisplayListRecorder&);

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteAdapter.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteAdapter.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteAdapter.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -73,7 +73,7 @@
 
     PAL::WebGPU::Adapter& backing() { return m_backing; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void requestDevice(const WebGPU::DeviceDescriptor&, WebGPUIdentifier, CompletionHandler<void(WebGPU::SupportedFeatures&&, WebGPU::SupportedLimits&&)>&&);
 

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteBindGroup.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteBindGroup.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteBindGroup.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -70,7 +70,7 @@
 
     PAL::WebGPU::BindGroup& backing() { return m_backing; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void setLabel(String&&);
 

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteBindGroupLayout.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteBindGroupLayout.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteBindGroupLayout.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -70,7 +70,7 @@
 
     PAL::WebGPU::BindGroupLayout& backing() { return m_backing; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void setLabel(String&&);
 

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteBuffer.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteBuffer.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteBuffer.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -75,7 +75,7 @@
 
     PAL::WebGPU::Buffer& backing() { return m_backing; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void mapAsync(PAL::WebGPU::MapModeFlags, PAL::WebGPU::Size64 offset, std::optional<PAL::WebGPU::Size64> sizeForMap, CompletionHandler<void(std::optional<Vector<uint8_t>>&&)>&&);
     void unmap(Vector<uint8_t>&&);

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteCommandBuffer.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteCommandBuffer.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteCommandBuffer.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -70,7 +70,7 @@
 
     PAL::WebGPU::CommandBuffer& backing() { return m_backing; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void setLabel(String&&);
 

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteCommandEncoder.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteCommandEncoder.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteCommandEncoder.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -77,7 +77,7 @@
 
     PAL::WebGPU::CommandEncoder& backing() { return m_backing; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void beginRenderPass(const WebGPU::RenderPassDescriptor&, WebGPUIdentifier);
     void beginComputePass(const std::optional<WebGPU::ComputePassDescriptor>&, WebGPUIdentifier);

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteComputePassEncoder.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteComputePassEncoder.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteComputePassEncoder.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -71,7 +71,7 @@
 
     PAL::WebGPU::ComputePassEncoder& backing() { return m_backing; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void setPipeline(WebGPUIdentifier);
     void dispatch(PAL::WebGPU::Size32 workgroupCountX, PAL::WebGPU::Size32 workgroupCountY = 1, PAL::WebGPU::Size32 workgroupCountZ = 1);

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteComputePipeline.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteComputePipeline.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteComputePipeline.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -70,7 +70,7 @@
 
     PAL::WebGPU::ComputePipeline& backing() { return m_backing; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void getBindGroupLayout(uint32_t index, WebGPUIdentifier);
 

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteDevice.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -86,7 +86,7 @@
 
     PAL::WebGPU::Device& backing() { return m_backing; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void destroy();
 

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteExternalTexture.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteExternalTexture.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteExternalTexture.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -70,7 +70,7 @@
 
     PAL::WebGPU::ExternalTexture& backing() { return m_backing; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void setLabel(String&&);
 

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -132,7 +132,7 @@
         return m_streamConnection->connection().send(WTFMove(message), m_identifier);
     }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void requestAdapter(const WebGPU::RequestAdapterOptions&, WebGPUIdentifier, CompletionHandler<void(std::optional<RequestAdapterResponse>&&)>&&);
 

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemotePipelineLayout.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemotePipelineLayout.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemotePipelineLayout.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -70,7 +70,7 @@
 
     PAL::WebGPU::PipelineLayout& backing() { return m_backing; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void setLabel(String&&);
 

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteQuerySet.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteQuerySet.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteQuerySet.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -70,7 +70,7 @@
 
     PAL::WebGPU::QuerySet& backing() { return m_backing; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void destroy();
 

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteQueue.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteQueue.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteQueue.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -79,7 +79,7 @@
 
     PAL::WebGPU::Queue& backing() { return m_backing; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void submit(Vector<WebGPUIdentifier>&&);
 

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderBundle.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderBundle.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderBundle.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -70,7 +70,7 @@
 
     PAL::WebGPU::RenderBundle& backing() { return m_backing; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void setLabel(String&&);
 

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderBundleEncoder.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderBundleEncoder.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderBundleEncoder.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -73,7 +73,7 @@
 
     PAL::WebGPU::RenderBundleEncoder& backing() { return m_backing; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void setPipeline(WebGPUIdentifier);
 

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderPassEncoder.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderPassEncoder.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderPassEncoder.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -73,7 +73,7 @@
 
     PAL::WebGPU::RenderPassEncoder& backing() { return m_backing; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void setPipeline(WebGPUIdentifier);
 

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderPipeline.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderPipeline.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteRenderPipeline.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -70,7 +70,7 @@
 
     PAL::WebGPU::RenderPipeline& backing() { return m_backing; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void getBindGroupLayout(uint32_t index, WebGPUIdentifier);
 

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteSampler.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteSampler.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteSampler.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -70,7 +70,7 @@
 
     PAL::WebGPU::Sampler& backing() { return m_backing; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void setLabel(String&&);
 

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteShaderModule.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteShaderModule.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteShaderModule.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -73,7 +73,7 @@
 
     PAL::WebGPU::ShaderModule& backing() { return m_backing; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void compilationInfo(CompletionHandler<void(Vector<WebGPU::CompilationMessage>&&)>&&);
 

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteTexture.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteTexture.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteTexture.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -71,7 +71,7 @@
 
     PAL::WebGPU::Texture& backing() { return m_backing; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void createView(const std::optional<WebGPU::TextureViewDescriptor>&, WebGPUIdentifier);
 

Modified: trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteTextureView.h (292279 => 292280)


--- trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteTextureView.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteTextureView.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -70,7 +70,7 @@
 
     PAL::WebGPU::TextureView& backing() { return m_backing; }
 
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 
     void setLabel(String&&);
 

Modified: trunk/Source/WebKit/Platform/IPC/HandleMessage.h (292279 => 292280)


--- trunk/Source/WebKit/Platform/IPC/HandleMessage.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/Platform/IPC/HandleMessage.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -240,7 +240,7 @@
 }
 
 template<typename T, typename C, typename MF>
-void handleMessageSynchronous(StreamServerConnectionBase& connection, Decoder& decoder, C* object, MF function)
+void handleMessageSynchronous(StreamServerConnection& connection, Decoder& decoder, C* object, MF function)
 {
     Connection::SyncRequestID syncRequestID;
     if (UNLIKELY(!decoder.decode(syncRequestID)))

Modified: trunk/Source/WebKit/Platform/IPC/StreamConnectionWorkQueue.cpp (292279 => 292280)


--- trunk/Source/WebKit/Platform/IPC/StreamConnectionWorkQueue.cpp	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/Platform/IPC/StreamConnectionWorkQueue.cpp	2022-04-04 07:29:46 UTC (rev 292280)
@@ -53,7 +53,7 @@
     wakeUp();
 }
 
-void StreamConnectionWorkQueue::addStreamConnection(StreamServerConnectionBase& connection)
+void StreamConnectionWorkQueue::addStreamConnection(StreamServerConnection& connection)
 {
     {
         Locker locker { m_lock };
@@ -66,7 +66,7 @@
     wakeUp();
 }
 
-void StreamConnectionWorkQueue::removeStreamConnection(StreamServerConnectionBase& connection)
+void StreamConnectionWorkQueue::removeStreamConnection(StreamServerConnection& connection)
 {
     {
         Locker locker { m_lock };
@@ -121,7 +121,7 @@
     bool hasMoreToProcess = false;
     do {
         Deque<WTF::Function<void()>> functions;
-        Vector<Ref<StreamServerConnectionBase>> connections;
+        Vector<Ref<StreamServerConnection>> connections;
         {
             Locker locker { m_lock };
             functions.swap(m_functions);
@@ -132,7 +132,7 @@
 
         hasMoreToProcess = false;
         for (auto& connection : connections)
-            hasMoreToProcess |= connection->dispatchStreamMessages(defaultMessageLimit) == StreamServerConnectionBase::HasMoreMessages;
+            hasMoreToProcess |= connection->dispatchStreamMessages(defaultMessageLimit) == StreamServerConnection::HasMoreMessages;
     } while (hasMoreToProcess);
 }
 

Modified: trunk/Source/WebKit/Platform/IPC/StreamConnectionWorkQueue.h (292279 => 292280)


--- trunk/Source/WebKit/Platform/IPC/StreamConnectionWorkQueue.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/Platform/IPC/StreamConnectionWorkQueue.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -45,8 +45,8 @@
 
     StreamConnectionWorkQueue(const char*);
     ~StreamConnectionWorkQueue();
-    void addStreamConnection(StreamServerConnectionBase&);
-    void removeStreamConnection(StreamServerConnectionBase&);
+    void addStreamConnection(StreamServerConnection&);
+    void removeStreamConnection(StreamServerConnection&);
 
     void dispatch(WTF::Function<void()>&&) final;
     void stopAndWaitForCompletion();
@@ -69,7 +69,7 @@
     mutable Lock m_lock;
     RefPtr<Thread> m_processingThread WTF_GUARDED_BY_LOCK(m_lock);
     Deque<Function<void()>> m_functions WTF_GUARDED_BY_LOCK(m_lock);
-    HashCountedSet<Ref<StreamServerConnectionBase>> m_connections WTF_GUARDED_BY_LOCK(m_lock);
+    HashCountedSet<Ref<StreamServerConnection>> m_connections WTF_GUARDED_BY_LOCK(m_lock);
     friend void assertIsCurrent(const StreamConnectionWorkQueue&);
 };
 

Modified: trunk/Source/WebKit/Platform/IPC/StreamMessageReceiver.h (292279 => 292280)


--- trunk/Source/WebKit/Platform/IPC/StreamMessageReceiver.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/Platform/IPC/StreamMessageReceiver.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -29,7 +29,7 @@
 
 namespace IPC {
 
-class StreamServerConnectionBase;
+class StreamServerConnection;
 class Decoder;
 
 class StreamMessageReceiver : public ThreadSafeRefCounted<StreamMessageReceiver> {
@@ -36,7 +36,7 @@
 public:
     virtual ~StreamMessageReceiver() { }
 
-    virtual void didReceiveStreamMessage(StreamServerConnectionBase&, Decoder&) = 0;
+    virtual void didReceiveStreamMessage(StreamServerConnection&, Decoder&) = 0;
 };
 
 } // namespace IPC

Modified: trunk/Source/WebKit/Platform/IPC/StreamServerConnection.cpp (292279 => 292280)


--- trunk/Source/WebKit/Platform/IPC/StreamServerConnection.cpp	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/Platform/IPC/StreamServerConnection.cpp	2022-04-04 07:29:46 UTC (rev 292280)
@@ -31,7 +31,7 @@
 
 namespace IPC {
 
-StreamServerConnectionBase::StreamServerConnectionBase(Connection& connection, StreamConnectionBuffer&& stream, StreamConnectionWorkQueue& workQueue)
+StreamServerConnection::StreamServerConnection(Connection& connection, StreamConnectionBuffer&& stream, StreamConnectionWorkQueue& workQueue)
     : m_connection(connection)
     , m_workQueue(workQueue)
     , m_buffer(WTFMove(stream))
@@ -38,8 +38,15 @@
 {
 }
 
-void StreamServerConnectionBase::startReceivingMessagesImpl(ReceiverName receiverName, uint64_t destinationID)
+void StreamServerConnection::startReceivingMessages(StreamMessageReceiver& receiver, ReceiverName receiverName, uint64_t destinationID)
 {
+    {
+        auto key = std::make_pair(static_cast<uint8_t>(receiverName), destinationID);
+        Locker locker { m_receiversLock };
+        ASSERT(!m_receivers.contains(key));
+        m_receivers.add(key, receiver);
+    }
+
     // FIXME: Can we avoid synchronous dispatch here by adjusting the assertion in `Connection::enqueueMatchingMessagesToMessageReceiveQueue`?
     callOnMainRunLoopAndWait([&] {
         m_connection->addMessageReceiveQueue(*this, receiverName, destinationID);
@@ -47,7 +54,7 @@
     m_workQueue.addStreamConnection(*this);
 }
 
-void StreamServerConnectionBase::startReceivingMessagesImpl(ReceiverName receiverName)
+void StreamServerConnection::startReceivingMessages(ReceiverName receiverName)
 {
     callOnMainRunLoopAndWait([&] {
         m_connection->addMessageReceiveQueue(*this, receiverName);
@@ -55,19 +62,24 @@
     m_workQueue.addStreamConnection(*this);
 }
 
-void StreamServerConnectionBase::stopReceivingMessagesImpl(ReceiverName receiverName)
+void StreamServerConnection::stopReceivingMessages(ReceiverName receiverName)
 {
     m_connection->removeMessageReceiveQueue(receiverName);
     m_workQueue.removeStreamConnection(*this);
 }
 
-void StreamServerConnectionBase::stopReceivingMessagesImpl(ReceiverName receiverName, uint64_t destinationID)
+void StreamServerConnection::stopReceivingMessages(ReceiverName receiverName, uint64_t destinationID)
 {
     m_connection->removeMessageReceiveQueue(receiverName, destinationID);
     m_workQueue.removeStreamConnection(*this);
+
+    auto key = std::make_pair(static_cast<uint8_t>(receiverName), destinationID);
+    Locker locker { m_receiversLock };
+    ASSERT(m_receivers.contains(key));
+    m_receivers.remove(key);
 }
 
-void StreamServerConnectionBase::enqueueMessage(Connection&, std::unique_ptr<Decoder>&& message)
+void StreamServerConnection::enqueueMessage(Connection&, std::unique_ptr<Decoder>&& message)
 {
     {
         Locker locker { m_outOfStreamMessagesLock };
@@ -76,7 +88,7 @@
     m_workQueue.wakeUp();
 }
 
-std::optional<StreamServerConnectionBase::Span> StreamServerConnectionBase::tryAcquire()
+std::optional<StreamServerConnection::Span> StreamServerConnection::tryAcquire()
 {
     ServerLimit serverLimit = sharedServerLimit().load(std::memory_order_acquire);
     if (serverLimit == ServerLimit::serverIsSleepingTag)
@@ -94,12 +106,12 @@
     return result;
 }
 
-StreamServerConnectionBase::Span StreamServerConnectionBase::acquireAll()
+StreamServerConnection::Span StreamServerConnection::acquireAll()
 {
     return alignedSpan(0, dataSize() - 1);
 }
 
-void StreamServerConnectionBase::release(size_t readSize)
+void StreamServerConnection::release(size_t readSize)
 {
     ASSERT(readSize);
     readSize = std::max(readSize, minimumMessageSize);
@@ -115,7 +127,7 @@
     m_serverOffset = serverOffset;
 }
 
-void StreamServerConnectionBase::releaseAll()
+void StreamServerConnection::releaseAll()
 {
     sharedServerLimit().store(static_cast<ServerLimit>(0), std::memory_order_release);
     ServerOffset oldServerOffset = sharedServerOffset().exchange(static_cast<ServerOffset>(0), std::memory_order_acq_rel);
@@ -127,7 +139,7 @@
     m_serverOffset = 0;
 }
 
-StreamServerConnectionBase::Span StreamServerConnectionBase::alignedSpan(size_t offset, size_t limit)
+StreamServerConnection::Span StreamServerConnection::alignedSpan(size_t offset, size_t limit)
 {
     ASSERT(offset < dataSize());
     ASSERT(limit < dataSize());
@@ -143,7 +155,7 @@
     return { data() + aligned, resultSize };
 }
 
-size_t StreamServerConnectionBase::size(size_t offset, size_t limit)
+size_t StreamServerConnection::size(size_t offset, size_t limit)
 {
     if (offset <= limit)
         return limit - offset;
@@ -150,7 +162,7 @@
     return dataSize() - offset;
 }
 
-size_t StreamServerConnectionBase::clampedLimit(ServerLimit serverLimit) const
+size_t StreamServerConnection::clampedLimit(ServerLimit serverLimit) const
 {
     ASSERT(!(serverLimit & ServerLimit::serverIsSleepingTag));
     size_t limit = static_cast<size_t>(serverLimit);
@@ -158,28 +170,8 @@
     return std::min(limit, dataSize() - 1);
 }
 
-void StreamServerConnection::startReceivingMessages(StreamMessageReceiver& receiver, ReceiverName receiverName, uint64_t destinationID)
+StreamServerConnection::DispatchResult StreamServerConnection::dispatchStreamMessages(size_t messageLimit)
 {
-    {
-        auto key = std::make_pair(static_cast<uint8_t>(receiverName), destinationID);
-        Locker locker { m_receiversLock };
-        ASSERT(!m_receivers.contains(key));
-        m_receivers.add(key, receiver);
-    }
-    StreamServerConnectionBase::startReceivingMessagesImpl(receiverName, destinationID);
-}
-
-void StreamServerConnection::stopReceivingMessages(ReceiverName receiverName, uint64_t destinationID)
-{
-    StreamServerConnectionBase::stopReceivingMessagesImpl(receiverName, destinationID);
-    auto key = std::make_pair(static_cast<uint8_t>(receiverName), destinationID);
-    Locker locker { m_receiversLock };
-    ASSERT(m_receivers.contains(key));
-    m_receivers.remove(key);
-}
-
-StreamServerConnectionBase::DispatchResult StreamServerConnection::dispatchStreamMessages(size_t messageLimit)
-{
     RefPtr<StreamMessageReceiver> currentReceiver;
     // FIXME: Implement WTF::isValid(ReceiverName).
     uint8_t currentReceiverName = static_cast<uint8_t>(ReceiverName::Invalid);

Modified: trunk/Source/WebKit/Platform/IPC/StreamServerConnection.h (292279 => 292280)


--- trunk/Source/WebKit/Platform/IPC/StreamServerConnection.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/Platform/IPC/StreamServerConnection.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -40,11 +40,32 @@
 
 class StreamConnectionWorkQueue;
 
-class StreamServerConnectionBase : public ThreadSafeRefCounted<StreamServerConnectionBase>, protected MessageReceiveQueue {
-    WTF_MAKE_NONCOPYABLE(StreamServerConnectionBase);
+// StreamServerConnection represents the connection between stream client and server, as used by the server.
+//
+// StreamServerConnection:
+//  * Holds the messages towards the server.
+//  * Sends the replies back to the client via the stream or normal Connection fallback.
+//
+// Receiver template contract:
+//   void didReceiveStreamMessage(StreamServerConnection&, Decoder&);
+//
+// The StreamServerConnection does not trust the StreamClientConnection.
+class StreamServerConnection final : public ThreadSafeRefCounted<StreamServerConnection>, private MessageReceiveQueue {
+    WTF_MAKE_NONCOPYABLE(StreamServerConnection);
 public:
-    ~StreamServerConnectionBase() override = default;
+    static Ref<StreamServerConnection> create(Connection& connection, StreamConnectionBuffer&& streamBuffer, StreamConnectionWorkQueue& workQueue)
+    {
+        return adoptRef(*new StreamServerConnection(connection, WTFMove(streamBuffer), workQueue));
+    }
+    ~StreamServerConnection() final = default;
 
+    void startReceivingMessages(StreamMessageReceiver&, ReceiverName, uint64_t destinationID);
+    // Stops the message receipt. Note: already received messages might still be delivered.
+    void stopReceivingMessages(ReceiverName, uint64_t destinationID);
+
+    void startReceivingMessages(ReceiverName);
+    void stopReceivingMessages(ReceiverName);
+
     Connection& connection() { return m_connection; }
 
     enum DispatchResult : bool {
@@ -51,20 +72,14 @@
         HasNoMessages,
         HasMoreMessages
     };
-    virtual DispatchResult dispatchStreamMessages(size_t messageLimit) = 0;
+    DispatchResult dispatchStreamMessages(size_t messageLimit);
 
     template<typename T, typename... Arguments>
     void sendSyncReply(Connection::SyncRequestID, Arguments&&...);
 
-protected:
-    StreamServerConnectionBase(IPC::Connection&, StreamConnectionBuffer&&, StreamConnectionWorkQueue&);
+private:
+    StreamServerConnection(IPC::Connection&, StreamConnectionBuffer&&, StreamConnectionWorkQueue&);
 
-    void startReceivingMessagesImpl(ReceiverName, uint64_t destinationID);
-    void stopReceivingMessagesImpl(ReceiverName, uint64_t destinationID);
-
-    void startReceivingMessagesImpl(ReceiverName);
-    void stopReceivingMessagesImpl(ReceiverName);
-
     // MessageReceiveQueue
     void enqueueMessage(Connection&, std::unique_ptr<Decoder>&&) final;
 
@@ -90,6 +105,9 @@
     size_t clampedLimit(ServerLimit) const;
     uint8_t* data() const { return m_buffer.data(); }
     size_t dataSize() const { return m_buffer.dataSize(); }
+    bool processSetStreamDestinationID(Decoder&&, RefPtr<StreamMessageReceiver>& currentReceiver);
+    bool dispatchStreamMessage(Decoder&&, StreamMessageReceiver&);
+    bool dispatchOutOfStreamMessage(Decoder&&);
 
     Ref<IPC::Connection> m_connection;
     StreamConnectionWorkQueue& m_workQueue;
@@ -101,12 +119,16 @@
     Deque<std::unique_ptr<Decoder>> m_outOfStreamMessages WTF_GUARDED_BY_LOCK(m_outOfStreamMessagesLock);
 
     bool m_isDispatchingStreamMessage { false };
+    Lock m_receiversLock;
+    using ReceiversMap = HashMap<std::pair<uint8_t, uint64_t>, Ref<StreamMessageReceiver>>;
+    ReceiversMap m_receivers WTF_GUARDED_BY_LOCK(m_receiversLock);
+    uint64_t m_currentDestinationID { 0 };
 
     friend class StreamConnectionWorkQueue;
 };
 
 template<typename T, typename... Arguments>
-void StreamServerConnectionBase::sendSyncReply(Connection::SyncRequestID syncRequestID, Arguments&&... arguments)
+void StreamServerConnection::sendSyncReply(Connection::SyncRequestID syncRequestID, Arguments&&... arguments)
 {
     if constexpr(T::isReplyStreamEncodable) {
         if (m_isDispatchingStreamMessage) {
@@ -125,56 +147,4 @@
     m_connection->sendSyncReply(WTFMove(encoder));
 }
 
-// StreamServerConnection represents the connection between stream client and server, as used by the server.
-//
-// StreamServerConnection:
-//  * Holds the messages towards the server.
-//  * Sends the replies back to the client via the stream or normal Connection fallback.
-//
-// Receiver template contract:
-//   void didReceiveStreamMessage(StreamServerConnectionBase&, Decoder&);
-//
-// The StreamServerConnection does not trust the StreamClientConnection.
-class StreamServerConnection final : public StreamServerConnectionBase {
-public:
-    static Ref<StreamServerConnection> create(Connection& connection, StreamConnectionBuffer&& streamBuffer, StreamConnectionWorkQueue& workQueue)
-    {
-        return adoptRef(*new StreamServerConnection(connection, WTFMove(streamBuffer), workQueue));
-    }
-    ~StreamServerConnection() final = default;
-
-    void startReceivingMessages(StreamMessageReceiver&, ReceiverName, uint64_t destinationID);
-    // Stops the message receipt. Note: already received messages might still be delivered.
-    void stopReceivingMessages(ReceiverName, uint64_t destinationID);
-
-    inline void startReceivingMessages(ReceiverName);
-    inline void stopReceivingMessages(ReceiverName);
-
-    // StreamServerConnectionBase overrides.
-    DispatchResult dispatchStreamMessages(size_t messageLimit) final;
-
-private:
-    StreamServerConnection(Connection& connection, StreamConnectionBuffer&& streamBuffer, StreamConnectionWorkQueue& workQueue)
-        : StreamServerConnectionBase(connection, WTFMove(streamBuffer), workQueue)
-    {
-    }
-    bool processSetStreamDestinationID(Decoder&&, RefPtr<StreamMessageReceiver>& currentReceiver);
-    bool dispatchStreamMessage(Decoder&&, StreamMessageReceiver&);
-    bool dispatchOutOfStreamMessage(Decoder&&);
-    Lock m_receiversLock;
-    using ReceiversMap = HashMap<std::pair<uint8_t, uint64_t>, Ref<StreamMessageReceiver>>;
-    ReceiversMap m_receivers WTF_GUARDED_BY_LOCK(m_receiversLock);
-    uint64_t m_currentDestinationID { 0 };
-};
-
-void StreamServerConnection::startReceivingMessages(ReceiverName receiverName)
-{
-    StreamServerConnectionBase::startReceivingMessagesImpl(receiverName);
 }
-
-void StreamServerConnection::stopReceivingMessages(ReceiverName receiverName)
-{
-    StreamServerConnectionBase::stopReceivingMessagesImpl(receiverName);
-}
-
-}

Modified: trunk/Source/WebKit/Scripts/webkit/messages.py (292279 => 292280)


--- trunk/Source/WebKit/Scripts/webkit/messages.py	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/Scripts/webkit/messages.py	2022-04-04 07:29:46 UTC (rev 292280)
@@ -1133,7 +1133,7 @@
             async_messages.append(message)
 
     if receiver.has_attribute(STREAM_ATTRIBUTE):
-        result.append('void %s::didReceiveStreamMessage(IPC::StreamServerConnectionBase& connection, IPC::Decoder& decoder)\n' % (receiver.name))
+        result.append('void %s::didReceiveStreamMessage(IPC::StreamServerConnection& connection, IPC::Decoder& decoder)\n' % (receiver.name))
         result.append('{\n')
         assert(receiver.has_attribute(NOT_REFCOUNTED_RECEIVER_ATTRIBUTE))
         assert(not receiver.has_attribute(WANTS_DISPATCH_MESSAGE_ATTRIBUTE))

Modified: trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp (292279 => 292280)


--- trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp	2022-04-04 07:29:46 UTC (rev 292280)
@@ -40,7 +40,7 @@
 
 namespace WebKit {
 
-void TestWithStream::didReceiveStreamMessage(IPC::StreamServerConnectionBase& connection, IPC::Decoder& decoder)
+void TestWithStream::didReceiveStreamMessage(IPC::StreamServerConnection& connection, IPC::Decoder& decoder)
 {
     if (decoder.messageName() == Messages::TestWithStream::SendString::name())
         return IPC::handleMessage<Messages::TestWithStream::SendString>(connection.connection(), decoder, this, &TestWithStream::sendString);

Modified: trunk/Source/WebKit/Shared/IPCStreamTester.h (292279 => 292280)


--- trunk/Source/WebKit/Shared/IPCStreamTester.h	2022-04-04 06:18:29 UTC (rev 292279)
+++ trunk/Source/WebKit/Shared/IPCStreamTester.h	2022-04-04 07:29:46 UTC (rev 292280)
@@ -49,7 +49,7 @@
     void stopListeningForIPC(Ref<IPCStreamTester>&& refFromConnection);
 
     // IPC::StreamMessageReceiver overrides.
-    void didReceiveStreamMessage(IPC::StreamServerConnectionBase&, IPC::Decoder&) final;
+    void didReceiveStreamMessage(IPC::StreamServerConnection&, IPC::Decoder&) final;
 private:
     IPCStreamTester(IPC::Connection&, IPCStreamTesterIdentifier, IPC::StreamConnectionBuffer&&);
     ~IPCStreamTester();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to