Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: edd9fe9dbe988d809ee9819e78bc0f4c1668f0d2
      
https://github.com/WebKit/WebKit/commit/edd9fe9dbe988d809ee9819e78bc0f4c1668f0d2
  Author: Jessica Lee <[email protected]>
  Date:   2026-09-03 (Thu, 03 Sep 2026)

  Changed paths:
    M Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
    M Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h
    M Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
    M Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h

  Log Message:
  -----------
  [Site Isolation] http/tests/misc/webtiming-cross-origin-and-back1.html is a 
timeout
https://bugs.webkit.org/show_bug.cgi?id=322870
rdar://186116994

Reviewed by Alex Christensen.

Currently, m_topLoadingFrame is tracked per-process in the InjectedBundle which 
means it is
shared by all the WKBundlePages of InjectedBundle. Because it's per process, it 
can end
up tracking the wrong load of the various pages. In 
webtiming-cross-origin-and-back1.html's case,
it was an abandoned provisional load from a redirect. For tests with pop-ups, 
the pop-up can overwrite
the opener's m_topLoadingFrame. WebKit relies on m_topLoadingFrame to match the 
load's
frame to properly notify the test runner. If the loading frame does not match 
m_topLoadingFrame,
the test runner is never notified and the test times out.

The fix is to have each page track its own m_topLoadingFrame so that 
provisional loads for
pages in the shared process don't overwrite the primary page's (ie 
InjectedBundle::page())
m_topLoadingFrame. We additionally check that the page being loaded is the 
primary page. If not,
we don't notify the test runner and exit early.

http/tests/misc/webtiming-cross-origin-and-back1.html is the relevant test.

* Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
(WTR::InjectedBundle::done):
* Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h:
(WTR::InjectedBundle::topLoadingFrame): Deleted.
(WTR::InjectedBundle::setTopLoadingFrame): Deleted.
* Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::resetAfterTest):
(WTR::InjectedBundlePage::didStartProvisionalLoadForFrame):
(WTR::InjectedBundlePage::frameDidChangeLocation):
(WTR::InjectedBundlePage::notifyDone):
* Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
(WTR::InjectedBundlePage::topLoadingFrame):
(WTR::InjectedBundlePage::setTopLoadingFrame):

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



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

Reply via email to