Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8957ef7eaf3d0649732c89d25245d8bf795241a6
      
https://github.com/WebKit/WebKit/commit/8957ef7eaf3d0649732c89d25245d8bf795241a6
  Author: Per Arne Vollan <[email protected]>
  Date:   2026-09-24 (Thu, 24 Sep 2026)

  Changed paths:
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
    M Source/WebKit/WebProcess/WebCoreSupport/WebMessagePortChannelProvider.cpp
    M Source/WebKit/WebProcess/WebCoreSupport/WebMessagePortChannelProvider.h
    M Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.cpp
    M Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.h
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm

  Log Message:
  -----------
  [Site Isolation][iOS] Scrolling on nytimes.com is oftentimes terminating 
WebContent processes
https://bugs.webkit.org/show_bug.cgi?id=324756
rdar://188031329

Reviewed by Sihui Liu.

This is because several message checks are failing in 
NetworkConnectionToWebProcess in message receivers
related to message ports.

This patch fixes a race where the messages 
EntangleLocalPortInThisProcessToRemote and PostMessageToRemote
could arrive in the Networking process before CreateNewMessagePortChannel. This 
is wrong and can lead to
incorrect behavior. This is fixed by doing a roundtrip to the Networking 
process before sending the
message WebPageProxy::PostMessageToRemote in WebRemoteFrameClient.

* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::flushNetworkProcessIPC):
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h:
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* Source/WebKit/WebProcess/WebCoreSupport/WebMessagePortChannelProvider.cpp:
(WebKit::WebMessagePortChannelProvider::ensureMessagePortCreatedWithRoundtrip):
* Source/WebKit/WebProcess/WebCoreSupport/WebMessagePortChannelProvider.h:
* Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.cpp:
(WebKit::WebRemoteFrameClient::postMessageToRemote):
(WebKit::WebRemoteFrameClient::PendingPostMessages::takeMessagesThroughNextPortTransfer):
* Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.h:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm:
(TestWebKitAPI::TEST(SiteIsolation, 
PostMessageWithMessagePortsFromIFrameToMainFrame)):

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



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

Reply via email to