Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e778f1ba5d72ff38eeeae8021cee33fe751f8043
      
https://github.com/WebKit/WebKit/commit/e778f1ba5d72ff38eeeae8021cee33fe751f8043
  Author: Chris Dumez <[email protected]>
  Date:   2026-06-25 (Thu, 25 Jun 2026)

  Changed paths:
    M Source/WebKit/Shared/NavigationActionData.h
    M Source/WebKit/Shared/NavigationActionData.serialization.in
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

  Log Message:
  -----------
  Avoid serializing and re-parsing the navigation URL twice in 
NavigationActionData
https://bugs.webkit.org/show_bug.cgi?id=317812
rdar://180510568

Reviewed by Per Arne Vollan.

NavigationActionData carries two ResourceRequests, `originalRequest` and 
`request`,
each of which is decoded on the UIProcess main thread when handling
DecidePolicyForNavigationAction. Decoding a ResourceRequest re-parses its URL 
(via
ResourceRequest::doUpdateResourceRequest), so for a top-level navigation with no
redirect — where `originalRequest` equals `request` — the same URL is 
serialized and
parsed twice.

Given that the URL decoding is happening on the main thread of the UIProcess
and that we see some hangs in this code path, this cuts the amount of work
by half in the common case.

* Source/WebKit/Shared/NavigationActionData.h:
(WebKit::NavigationActionData::originalRequestOrFallback const):
* Source/WebKit/Shared/NavigationActionData.serialization.in:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::navigationActionData const):

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



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

Reply via email to