This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ConnectionCocoa doesn't receive disconnect notifications before the c…
…lient has finished initialising https://bugs.webkit.org/show_bug.cgi?id=241666 Reviewed by Kimmo Kinnunen. Adds a MACH_NOTIFY_NO_SENDERS notification to the receive port of a server-side Connection object, so that we can receive notifications if we fail to initialize the client side of the connection. This gets removed again once the client side initialization completes, since we already have handling for disconnections from that point onwards. The test WebProcessTerminationAfterTooManyGPUProcessCrashes would hang in case the GPU Process would be restarted and the test would terminate it before the connection was fully established, before the WebContent process would receive the send right. The test is written in such a way that it is expected is that the GPUP kill happens only after the connection has been re-established and the audio is playing. * Source/WebKit/Platform/IPC/cocoa/ConnectionCocoa.mm: (IPC::requestNoSenderNotifications): (IPC::clearNoSenderNotifications): (IPC::Connection::open): (IPC::Connection::receiveSourceEventHandler): * Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm: (TEST): Adds some early returns for failure cases, so that we don't call kill(0, 9). Canonical link: https://commits.webkit.org/251712@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295707 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing 2 changed files with 32 additions and 20 deletions.