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

  Changed paths:
    A Source/WebKit/Shared/PendingPostMessages.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    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] Posted messages can arrive out of order
https://bugs.webkit.org/show_bug.cgi?id=325191
rdar://188323585

Reviewed by Ryosuke Niwa and Sihui Liu.

The reason for this is that we will immediately send the message 
WebPage::RemotePostMessage from
WebPageProxy::postMessageToRemote when there are no message ports to transfer. 
If a message with
message ports is still waiting for the roundtrip to the Networking process in
WebPageProxy::postMessageToRemote, the 2nd message will arrive first in the 
target frame process.

Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm

* Source/WebKit/Shared/PendingPostMessages.h: Added.
(WebKit::PendingPostMessages::create):
(WebKit::PendingPostMessages::isEmpty const):
(WebKit::PendingPostMessages::append):
(WebKit::PendingPostMessages::takeMessagesThroughNextPortTransfer):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::postMessageToRemote):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.cpp:
(WebKit::WebRemoteFrameClient::PendingPostMessages::takeMessagesThroughNextPortTransfer):
 Deleted.
* Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.h:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm:
(TestWebKitAPI::TEST(SiteIsolation, 
PostMessageWithMessagePortsFromIFrameToMainFrame)):

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



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

Reply via email to