Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2a61c086943c665f8b8e54ecbaa6130a7578bbdf
      
https://github.com/WebKit/WebKit/commit/2a61c086943c665f8b8e54ecbaa6130a7578bbdf
  Author: Ben Nham <[email protected]>
  Date:   2025-09-06 (Sat, 06 Sep 2025)

  Changed paths:
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h

  Log Message:
  -----------
  didGeneratePageLoadTiming is called flakily when Site Isolation is disabled
https://bugs.webkit.org/show_bug.cgi?id=298344
rdar://159789224

Reviewed by Per Arne Vollan and Sihui Liu.

When Site Isolation is disabled, we don't clear the 
frames-with-pending-subresources map when
navigating to a new page. This causes the didGeneratePageLoadTiming callback to 
be flaky when SI is
disabled, since it can cause WebPageProxy to think that the newly committed 
page has outstanding
subresource loads, when those loads are actually associated with the previous 
page.

In addition, we have to clear the pending subresource count map in 
WebPage::didCommitLoad. This is
because WebPageProxy::didCommitLoadForFrame also clears the equivalent map on 
the UIProcess
side. Clearing one without clearing the other leads the UIProcess and 
WebProcess to have differing
ideas about the pending subresource count on the current page, which results in 
asserts firing in
debug builds and incorrect metrics in release builds.

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::addResourceRequest):
(WebKit::WebPage::removeResourceRequest):
(WebKit::WebPage::didCommitLoad):
* Source/WebKit/WebProcess/WebPage/WebPage.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to