Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ec445d2204215668407ddbdc65c1d4d35327e9eb
https://github.com/WebKit/WebKit/commit/ec445d2204215668407ddbdc65c1d4d35327e9eb
Author: Rupin Mittal <[email protected]>
Date: 2026-08-14 (Fri, 14 Aug 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/traverseTo-detach-between-navigate-and-navigatesuccess-expected.txt
M Source/WebCore/loader/FrameLoader.cpp
M Source/WebCore/page/Navigation.cpp
M Source/WebCore/page/Navigation.h
Log Message:
-----------
[Navigation API] traverseTo-detach-between-navigate-and-navigatesuccess.html
is failing
https://bugs.webkit.org/show_bug.cgi?id=321639
rdar://184766408
Reviewed by Charlie Wolfe.
This test tests that if an iframe uses the Navigation API to traverse but gets
removed after committing but before finishing, then NavigateSuccess is not
fired, but NavigateError is and the finished promise rejects.
Currently, the test times out because NavigateError is not fired at all.
The spec says that when an iframe is destroyed, we must notify the iframe's
navigation object so that it can abort the ongoing navigation and reject
the finished promises of all the upcoming traverse trackers.
Spec:
https://html.spec.whatwg.org/multipage/document-sequences.html#destroy-a-child-navigable
has Step 4: Inform the navigation API about child navigable destruction given
navigable
https://html.spec.whatwg.org/multipage/nav-history-apis.html#inform-the-navigation-api-about-child-navigable-destruction
We currently don't implement this. So we fix the test by implementing it.
It is possible that informAboutChildNavigableDestruction() gets called when
the frames of a back/forward cache entry are disconnected when the entry is
being destroyed (see CachedFrame::destroy()). In that case the document is
suspended or stopped and can't dispatch events or settle promises. So we guard
against this case. Multiple tests were crashing without this guard.
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::frameDetached):
* Source/WebCore/page/Navigation.cpp:
(WebCore::Navigation::MethodTrackerRegistry::upcomingTraverseTrackers const):
(WebCore::Navigation::informAboutChildNavigableDestruction):
* Source/WebCore/page/Navigation.h:
*
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/traverseTo-detach-between-navigate-and-navigatesuccess-expected.txt:
Canonical link: https://commits.webkit.org/319183@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications