Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1d867f31b1819721c9efb1ccb4576133c5588020
https://github.com/WebKit/WebKit/commit/1d867f31b1819721c9efb1ccb4576133c5588020
Author: Alexey Proskuryakov <[email protected]>
Date: 2026-08-17 (Mon, 17 Aug 2026)
Changed paths:
M Source/WebCore/inspector/InspectorInstrumentation.cpp
M Source/WebInspectorUI/UserInterface/Controllers/ConsoleManager.js
Log Message:
-----------
this._isNewPageOrReload assertion fails in ConsoleManager.js on the first
navigation
https://bugs.webkit.org/show_bug.cgi?id=321815
rdar://184955117
Reviewed by BJ Burg.
`Console.messagesCleared` arrives before the `Page.frameNavigated` that sets
the flag, so the
assertion fired on the first navigation and afterwards only ever tested the
previous one. In fact,
the two events cannot be reliably correlated at all: under Site Isolation they
arrive on
different targets, and on a cross-process navigation the frontend synthesizes
the main resource
change only after an asynchronous `Page.getResourceTree` round-trip.
`reason` is authoritative, so drop the cross-check and keep the flag solely for
backends that don't
send one, renaming it to say so.
* Source/WebCore/inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didCommitLoadImpl): Remove an incorrect
comment.
`InspectorNetworkAgent::mainFrameNavigated` dispatches no event, so its
position is not observable
by the frontend.
* Source/WebInspectorUI/UserInterface/Controllers/ConsoleManager.js:
(WI.ConsoleManager): Rename `_isNewPageOrReload` to
`_legacyPendingMainFrameNavigationClear`.
(WI.ConsoleManager.prototype.messagesCleared): Drop the assertion.
(WI.ConsoleManager.prototype._delayedMessagesCleared): Rename.
(WI.ConsoleManager.prototype._mainResourceDidChange): Only track the pending
clear when the backend
doesn't send a `reason`.
Canonical link: https://commits.webkit.org/319338@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications