Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 492f5339c4e166cdab4a1d533208767d3d03818d
      
https://github.com/WebKit/WebKit/commit/492f5339c4e166cdab4a1d533208767d3d03818d
  Author: Basuke Suzuki <[email protected]>
  Date:   2026-09-17 (Thu, 17 Sep 2026)

  Changed paths:
    M Source/WebKit/Scripts/webkit/messages.py
    M Source/WebKit/Scripts/webkit/tests/MessageArgumentDescriptions.cpp
    A Source/WebKit/Shared/PolicyListenerIdentifier.h
    M Source/WebKit/Shared/WTFArgumentCoders.serialization.in
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    M Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
    M Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp
    M Source/WebKit/WebProcess/WebPage/WebFrame.cpp
    M Source/WebKit/WebProcess/WebPage/WebFrame.h

  Log Message:
  -----------
  [WebKit] Make WebFrame's policy listener ID a typed ObjectIdentifier
https://bugs.webkit.org/show_bug.cgi?id=324492
rdar://187731932

Reviewed by Charlie Wolfe.

WebFrame identifies an outstanding navigation policy check with a bare uint64_t:
generateListenerID() mints it, setUpPolicyListener() returns it, 
m_pendingPolicyChecks is keyed
by it, and didReceivePolicyDecision() takes it. The two frame loader clients 
carry it as
uint64_t as well.

Convert the whole chain rather than the WebFrame members alone, so that no 
uint64_t to
ObjectIdentifier conversions are left behind in the frame loader clients. 
generateListenerID()
goes away in favour of the generator ObjectIdentifier already provides. 
Register the identifier
for IPC as well, so that the type is usable over a message without a second 
round of plumbing.

No behaviour change.

No new tests (refactoring, no behavior change).

* Source/WebKit/Scripts/webkit/messages.py:
* Source/WebKit/Scripts/webkit/tests/MessageArgumentDescriptions.cpp:
* Source/WebKit/Shared/PolicyListenerIdentifier.h: Added.
* Source/WebKit/Shared/WTFArgumentCoders.serialization.in:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp:
(WebKit::WebLocalFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebLocalFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
* Source/WebKit/WebProcess/WebPage/WebFrame.cpp:
(WebKit::generateListenerID): Deleted.
(WebKit::WebFrame::setUpPolicyListener):
(WebKit::WebFrame::invalidatePolicyListeners):
(WebKit::WebFrame::didReceivePolicyDecision):
* Source/WebKit/WebProcess/WebPage/WebFrame.h:

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



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

Reply via email to