[webkit-changes] [WebKit/WebKit] e11ee9: [ iOS Debug ] fast/loader/crash-replacing-location...

Kimmo Kinnunen noreply at github.com
Mon Jan 30 12:28:00 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e11ee9df88e6ed81e827c30a3daa5103bf64292a
      https://github.com/WebKit/WebKit/commit/e11ee9df88e6ed81e827c30a3daa5103bf64292a
  Author: Kimmo Kinnunen <kkinnunen at apple.com>
  Date:   2023-01-30 (Mon, 30 Jan 2023)

  Changed paths:
    M Source/WebKit/Platform/IPC/cocoa/ConnectionCocoa.mm
    M Tools/TestWebKitAPI/Tests/IPC/ConnectionTests.cpp

  Log Message:
  -----------
  [ iOS Debug ] fast/loader/crash-replacing-location-before-load.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=251047
rdar://104576815

Reviewed by Matt Woodrow.

New connections for, say remote rendering backend, are sent through
WP -> GPUP main connection.
The new connection might be closed before the receiver receives it.
In this case, on Cocoa, the underlying connection Mach send right is
read from the kernel as MACH_PORT_DEAD during Mach message receipt.

Consider sequence:
 ... Runloop processing
 A
 Decode a message
 B
 Create connection from the port inside the message
 C
 ... Runloop processing

For IPC::Connection programming model, there is no difference
whether the sender closes the port at A, B or C. Make A behave
identical to already working B and C, e.g. deliver normal "connection
did close" signal.

Treat PORT_DEAD as a valid IPC::Connection client send right.
Construct the receive port as usual, but do not send the server
send right anywhere, as it cannot be sent to DEAD port. When the server
send right is destroyed, the receive port is notified that the sender
went away. This is obtains the common codepath for connection operation
for dead names.

* Source/WebKit/Platform/IPC/cocoa/ConnectionCocoa.mm:
(IPC::Connection::platformInvalidate):
(IPC::Connection::cancelSendSource):
(IPC::Connection::platformInitialize):
(IPC::Connection::platformOpen):
(IPC::Connection::sendOutgoingMessage):
(IPC::Connection::initializeSendSource):
* Tools/TestWebKitAPI/Tests/IPC/ConnectionTests.cpp:
(TestWebKitAPI::MockTestMessageWithConnection::name):
(TestWebKitAPI::MockTestMessageWithConnection::arguments):
(TestWebKitAPI::MockTestMessageWithConnection::MockTestMessageWithConnection):
(TestWebKitAPI::TEST_P):

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




More information about the webkit-changes mailing list