[webkit-changes] [WebKit/WebKit] b67b57: REGRESSION(267579 at main): ASSERTION FAILED: !m_pend...

Matthew Finkel noreply at github.com
Tue Sep 26 12:54:44 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b67b57d524038d5dfff438cc833d80c0019fb6bc
      https://github.com/WebKit/WebKit/commit/b67b57d524038d5dfff438cc833d80c0019fb6bc
  Author: Matthew Finkel <sysrqb at apple.com>
  Date:   2023-09-26 (Tue, 26 Sep 2023)

  Changed paths:
    M Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h

  Log Message:
  -----------
  REGRESSION(267579 at main): ASSERTION FAILED: !m_pendingNavigationID
https://bugs.webkit.org/show_bug.cgi?id=261837
rdar://115799843

Reviewed by Chris Dumez.

Before 267579 at main, a same-document navigation would not have an associated
navigation ID. In that change, I removed the same-document check and now all
navigations are given a navigation ID from the start. However, that change
caused an assertion failure in WebPage because WebPage was not told when a
same-document navigation completed, and This caused a situation where WebPage
was tracking two pending navigation IDs.

This patch resolves the issue by moving the current logic from
WebLocalFrameLoaderClient::dispatchDidChangeLocationWithinPage into a new
member function WebPage::didSameDocumentNavigationForFrame and resetting
m_pendingNavigationID in that function when the WebFrame is the main frame.

I manually ran all WKBackForwardList tests in a debug build and verified that
this change resolves the assertion failure.

* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp:
(WebKit::WebLocalFrameLoaderClient::dispatchDidChangeLocationWithinPage):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didSameDocumentNavigationForFrame):
* Source/WebKit/WebProcess/WebPage/WebPage.h:

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




More information about the webkit-changes mailing list