Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 93725f4afedae5dace94ace68053654074fc1f26
https://github.com/WebKit/WebKit/commit/93725f4afedae5dace94ace68053654074fc1f26
Author: Basuke Suzuki <[email protected]>
Date: 2026-04-13 (Mon, 13 Apr 2026)
Changed paths:
M Source/WebCore/page/Navigation.cpp
Log Message:
-----------
[Navigation API] Fix missing tracker cleanup in same-document handler
rejection
https://bugs.webkit.org/show_bug.cgi?id=311963
rdar://174513527
Reviewed by Rupin Mittal.
In handleSameDocumentNavigation(), when a handler promise rejects, the
finishedPromise is rejected but cleanupAPIMethodTracker() is never
called. The ongoing tracker remains set in m_ongoingAPIMethodTracker,
leaking until the next navigation overwrites it.
The success path correctly calls resolveFinishedPromise() which
internally calls cleanupAPIMethodTracker(), but the rejection path
was missing the corresponding cleanup.
Also modernize the adjacent Ref { } to protect() per current style.
No new tests. The tracker leak is internal state — the ongoing tracker
is silently overwritten by the next navigation's promoteUpcoming call.
Observable effects would require inspecting internal Navigation state
between navigations, which is not exposed to JS. Existing intercept
rejection tests (e.g., traverseTo-intercept-rejected.html) exercise
this code path but cannot observe the leaked tracker.
Ran imported/w3c/web-platform-tests/navigation-api/ — all 419 tests
passed, no regressions.
* Source/WebCore/page/Navigation.cpp:
(WebCore::Navigation::handleSameDocumentNavigation):
Canonical link: https://commits.webkit.org/311159@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications