Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0aff48e975c8f6a455108d49821c8913a0f41ec5
https://github.com/WebKit/WebKit/commit/0aff48e975c8f6a455108d49821c8913a0f41ec5
Author: Kimmo Kinnunen <[email protected]>
Date: 2026-08-14 (Fri, 14 Aug 2026)
Changed paths:
M LayoutTests/ipc/cache-font-null-palette-colors-crash.html
M LayoutTests/ipc/create-image-buffer-crash.html
M LayoutTests/ipc/decode-feConvolveMatrix-kernelSize-overflow.html
M LayoutTests/ipc/display-list-recorder-leak.html
M
LayoutTests/ipc/dynamic-content-scaling-display-list-during-prepare-for-display.html
M LayoutTests/ipc/feComponentTransfer-empty-tableValues-accelerated.html
M LayoutTests/ipc/fecolormatrix-type-values-mismatch-crash.html
M LayoutTests/ipc/insufficient-svgfilter-inputs-crash.html
M LayoutTests/ipc/invalid-feConvolveMatrix-crash.html
M LayoutTests/ipc/invalid-svgfilter-expression-crash.html
M LayoutTests/ipc/mark-surfaces-volatile-during-prepare-for-display.html
M LayoutTests/ipc/move-to-image-buffer-cross-thread-font-crash.html
M LayoutTests/ipc/nested-display-list-draw-control-part-crash.html
M LayoutTests/ipc/restore-empty-stack-crash.html
M
LayoutTests/ipc/rgba16f-getpixelbuffer-colorspace-mismatch-heap-disclosure.html
M LayoutTests/ipc/send-gpu-GetShareableBitmap-RemoteRenderingBackend.html
M
LayoutTests/ipc/send-invalid-sync-stream-message-empty-reply-check-exception.html
M LayoutTests/ipc/stream-async-with-reply.html
M LayoutTests/ipc/stream-check-autoreleasepool.html
M LayoutTests/ipc/stream-sync-crash-no-timeout.html
M LayoutTests/ipc/stream-sync-reply-shared-memory.html
M Source/WebKit/CMakeLists.txt
M Source/WebKit/DerivedSources-input.xcfilelist
M Source/WebKit/DerivedSources-output.xcfilelist
M Source/WebKit/DerivedSources.make
M Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp
M Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp
M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.cpp
M Source/WebKit/ModelProcess/ModelProcess.h
M Source/WebKit/ModelProcess/cocoa/ModelProcessCocoa.mm
M Source/WebKit/Platform/IPC/IPCEvent.h
M Source/WebKit/Platform/IPC/StreamClientConnection.cpp
M Source/WebKit/Platform/IPC/StreamClientConnection.h
M Source/WebKit/Platform/IPC/StreamClientConnectionBuffer.h
M Source/WebKit/Platform/IPC/StreamServerConnection.cpp
M Source/WebKit/Platform/IPC/StreamServerConnection.h
M Source/WebKit/Platform/IPC/StreamServerConnection.serialization.in
M Source/WebKit/Platform/IPC/darwin/IPCEventDarwin.cpp
M Source/WebKit/Scripts/webkit/model.py
M Source/WebKit/Scripts/webkit/tests/MessageNames.cpp
M Source/WebKit/Scripts/webkit/tests/MessageNames.h
M Source/WebKit/Shared/AuxiliaryProcess.h
M Source/WebKit/Shared/Cocoa/AuxiliaryProcessCocoa.mm
M Source/WebKit/Shared/IPCStreamTester.cpp
R Source/WebKit/Shared/IPCStreamTesterProxy.h
R Source/WebKit/Shared/IPCStreamTesterProxy.messages.in
M Source/WebKit/Shared/LogStream.h
M Source/WebKit/Shared/LogStream.mm
M Source/WebKit/Sources.txt
M Source/WebKit/UIProcess/AuxiliaryProcessProxy.h
M Source/WebKit/UIProcess/Cocoa/AuxiliaryProcessProxyCocoa.mm
M Source/WebKit/UIProcess/Model/ModelProcessProxy.messages.in
M Source/WebKit/UIProcess/WebProcessProxy.messages.in
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp
M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h
M
Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.messages.in
M Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp
M Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h
M
Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.messages.in
M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp
M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.h
M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.messages.in
M Source/WebKit/WebProcess/WebPage/IPCTestingAPI.cpp
M Source/WebKit/WebProcess/WebProcess.h
M Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
M Tools/TestWebKitAPI/CMakeLists.txt
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
A Tools/TestWebKitAPI/Tests/IPC/IPCEventTests.cpp
M Tools/TestWebKitAPI/Tests/IPC/MessageLogEndToEndTests.cpp
M Tools/TestWebKitAPI/Tests/IPC/StreamConnectionBufferTests.cpp
M Tools/TestWebKitAPI/Tests/IPC/StreamConnectionTests.cpp
Log Message:
-----------
Remove blocking for initialisation message in IPC StreamClientConnection
https://bugs.webkit.org/show_bug.cgi?id=321584
rdar://184700906
Reviewed by Mike Wyrzykowski.
Stream IPC clients would need a out-of-protocol message carrying the
initialization result for the connection, the client wait and server
wakeup semaphore. This was because:
- Client wait semaphore: the Mach semaphores break an wait
process termination if the terminated process was the one creating
the semaphore.
- Server wakeup semaphore: Server can only wait on one semaphore,
even if there are multiple connections processed. by one work queue.
Since client could not wait on the wait semaphore before the server
had sent it, the clients would need error-prone waits for the
initialization messages before sends could happen.
Make the client wait happen with IPC::Event, which is an mach receive
right. These can be created by the client and receive no senders
notification when the sender process is terminated.
Introduce IPC protocol message InitializeStreamClientConnection for
sending the server wakeup semaphore. This way the implementation does
not leak into the client messages. In the future, also this will be
replaced by a mach send right.
Fix IPC::Signal bug where signal() would block if previous signal was
not waited on.
Fix latent IPC::Event bug where receive bug was too small for
no senders notification.
* LayoutTests/ipc/cache-font-null-palette-colors-crash.html:
* LayoutTests/ipc/create-image-buffer-crash.html:
* LayoutTests/ipc/decode-feConvolveMatrix-kernelSize-overflow.html:
* LayoutTests/ipc/display-list-recorder-leak.html:
*
LayoutTests/ipc/dynamic-content-scaling-display-list-during-prepare-for-display.html:
* LayoutTests/ipc/feComponentTransfer-empty-tableValues-accelerated.html:
* LayoutTests/ipc/insufficient-svgfilter-inputs-crash.html:
* LayoutTests/ipc/invalid-svgfilter-expression-crash.html:
* LayoutTests/ipc/mark-surfaces-volatile-during-prepare-for-display.html:
* LayoutTests/ipc/move-to-image-buffer-cross-thread-font-crash.html:
* LayoutTests/ipc/nested-display-list-draw-control-part-crash.html:
*
LayoutTests/ipc/rgba16f-getpixelbuffer-colorspace-mismatch-heap-disclosure.html:
* LayoutTests/ipc/send-gpu-GetShareableBitmap-RemoteRenderingBackend.html:
*
LayoutTests/ipc/send-invalid-sync-stream-message-empty-reply-check-exception.html:
* LayoutTests/ipc/stream-async-with-reply.html:
* LayoutTests/ipc/stream-check-autoreleasepool.html:
* LayoutTests/ipc/stream-sync-crash-no-timeout.html:
* LayoutTests/ipc/stream-sync-reply-shared-memory.html:
* Source/WebKit/CMakeLists.txt:
* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources-output.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp:
(WebKit::RemoteGraphicsContextGL::workQueueInitialize):
* Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::workQueueInitialize):
* Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.cpp:
(WebKit::RemoteGPU::workQueueInitialize):
* Source/WebKit/ModelProcess/ModelProcess.h:
* Source/WebKit/ModelProcess/cocoa/ModelProcessCocoa.mm:
(WebKit::ModelProcess::sendCreateLogStreamToParent):
* Source/WebKit/Platform/IPC/IPCEvent.h:
(IPC::Event::Event):
(IPC::Event::operator=):
* Source/WebKit/Platform/IPC/StreamClientConnection.cpp:
(IPC::StreamClientConnection::create):
(IPC::StreamClientConnection::enqueueMessage):
(IPC::StreamClientConnection::open):
(IPC::StreamClientConnection::invalidate):
(IPC::StreamClientConnection::setSemaphores): Deleted.
(IPC::StreamClientConnection::hasSemaphores const): Deleted.
* Source/WebKit/Platform/IPC/StreamClientConnection.h:
* Source/WebKit/Platform/IPC/StreamClientConnectionBuffer.h:
(IPC::StreamClientConnectionBuffer::hasWakeUpSemaphore const):
(IPC::StreamClientConnectionBuffer::StreamClientConnectionBuffer):
(IPC::StreamClientConnectionBuffer::operator=):
(IPC::StreamClientConnectionBuffer::create):
(IPC::StreamClientConnectionBuffer::tryAcquire):
(IPC::StreamClientConnectionBuffer::tryAcquireAll):
(IPC::StreamClientConnectionBuffer::setWakeUpSemaphore):
(IPC::StreamClientConnectionBuffer::wakeUpServer):
(IPC::StreamClientConnectionBuffer::hasSemaphores const): Deleted.
(IPC::StreamClientConnectionBuffer::setSemaphores): Deleted.
* Source/WebKit/Platform/IPC/StreamServerConnection.cpp:
(IPC::StreamServerConnection::tryCreate):
(IPC::StreamServerConnection::StreamServerConnection):
(IPC::StreamServerConnection::open):
(IPC::StreamServerConnection::processSetStreamDestinationID):
(IPC::StreamServerConnection::processStreamMessage):
(IPC::StreamServerConnection::processOutOfStreamMessage):
* Source/WebKit/Platform/IPC/StreamServerConnection.h:
(IPC::StreamServerConnectionHandle::StreamServerConnectionHandle):
* Source/WebKit/Platform/IPC/StreamServerConnection.serialization.in:
* Source/WebKit/Platform/IPC/darwin/IPCEventDarwin.cpp:
(IPC::Event::wait):
(IPC::Event::waitFor):
* Source/WebKit/Scripts/webkit/model.py:
* Source/WebKit/Scripts/webkit/tests/MessageNames.cpp:
* Source/WebKit/Scripts/webkit/tests/MessageNames.h:
* Source/WebKit/Shared/AuxiliaryProcess.h:
(WebKit::AuxiliaryProcess::sendCreateLogStreamToParent):
* Source/WebKit/Shared/Cocoa/AuxiliaryProcessCocoa.mm:
(WebKit::AuxiliaryProcess::initializeLogForwarding):
* Source/WebKit/Shared/IPCStreamTester.cpp:
(WebKit::IPCStreamTester::initialize):
* Source/WebKit/Shared/IPCStreamTesterProxy.h: Removed.
* Source/WebKit/Shared/IPCStreamTesterProxy.messages.in: Removed.
* Source/WebKit/Shared/LogStream.h:
* Source/WebKit/Shared/LogStream.mm:
(WebKit::LogStream::create):
* Source/WebKit/Sources.txt:
* Source/WebKit/UIProcess/AuxiliaryProcessProxy.h:
* Source/WebKit/UIProcess/Cocoa/AuxiliaryProcessProxyCocoa.mm:
(WebKit::AuxiliaryProcessProxy::createLogStream):
* Source/WebKit/UIProcess/Model/ModelProcessProxy.messages.in:
* Source/WebKit/UIProcess/WebProcessProxy.messages.in:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
(WebKit::RemoteGraphicsContextGLProxy::wasCreated):
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
*
Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.messages.in:
* Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::ensureGPUProcessConnection):
(WebKit::RemoteRenderingBackendProxy::connection):
(WebKit::RemoteRenderingBackendProxy::didInitialize):
* Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.messages.in:
* Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp:
(WebKit::RemoteGPUProxy::wasCreated):
* Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.h:
* Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.messages.in:
* Source/WebKit/WebProcess/WebPage/IPCTestingAPI.cpp:
(WebKit::IPCTestingAPI::JSIPCSemaphore::encode const):
(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::staticFunctions):
(WebKit::IPCTestingAPI::JSIPCSemaphore::exchange): Deleted.
(WebKit::IPCTestingAPI::JSIPCStreamClientConnection::setSemaphores): Deleted.
* Source/WebKit/WebProcess/WebProcess.h:
* Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::accessibilityFocusedUIElement):
* Tools/TestWebKitAPI/Tests/IPC/MessageLogEndToEndTests.cpp:
* Tools/TestWebKitAPI/Tests/IPC/StreamConnectionBufferTests.cpp:
(TestWebKitAPI::createClientBuffer):
(TestWebKitAPI::TEST(StreamConnectionBufferTests, CreateWorks)):
(TestWebKitAPI::StreamConnectionBufferTest::client):
* Tools/TestWebKitAPI/Tests/IPC/StreamConnectionTests.cpp:
Canonical link: https://commits.webkit.org/319181@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications