Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 77bf2dc990684cfd080eda35cad136d5de72b282 https://github.com/WebKit/WebKit/commit/77bf2dc990684cfd080eda35cad136d5de72b282 Author: Charlie Wolfe <charl...@apple.com> Date: 2025-02-26 (Wed, 26 Feb 2025)
Changed paths: M Source/WebCore/history/BackForwardClient.h M Source/WebCore/history/BackForwardController.cpp M Source/WebCore/history/BackForwardController.h M Source/WebCore/loader/EmptyClients.cpp M Source/WebCore/loader/HistoryController.cpp M Source/WebCore/loader/HistoryController.h M Source/WebKit/UIProcess/WebBackForwardList.cpp M Source/WebKit/UIProcess/WebBackForwardList.h M Source/WebKit/UIProcess/WebPageProxy.cpp M Source/WebKit/UIProcess/WebPageProxy.h M Source/WebKit/UIProcess/WebPageProxy.messages.in M Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.cpp M Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.h M Source/WebKitLegacy/mac/History/BackForwardList.h M Tools/TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm Log Message: ----------- Fix a crash caused by a stale back/forward index in WebBackForwardList https://bugs.webkit.org/show_bug.cgi?id=288619 rdar://145386151 Reviewed by Alex Christensen and Pascoe. The changes in 288518@main tried to fix a crash caused by the provisional back/forward index tracked by the UI process not being committed, then cleared, resulting in it pointing to a stale index. So, I added an IPC message to notify the UI process when the web process commits the provisional history item. However, when navigating back to a cached page, the web process does not commit any history item, so the provisional index could still remain uncommitted. Instead, this change moves the commit of the provisional back/forward index to the DidCommitLoadForFrame message, which should be called when a history item is committed or a cached page is restored. * Source/WebCore/history/BackForwardClient.h: * Source/WebCore/history/BackForwardController.cpp: (WebCore::BackForwardController::commitProvisionalItem): Deleted. * Source/WebCore/history/BackForwardController.h: * Source/WebCore/loader/EmptyClients.cpp: * Source/WebCore/loader/HistoryController.cpp: (WebCore::HistoryController::updateForCommit): (WebCore::HistoryController::recursiveUpdateForCommit): (WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation): (WebCore::HistoryController::commitProvisionalItem): Deleted. * Source/WebCore/loader/HistoryController.h: * Source/WebKit/UIProcess/WebBackForwardList.cpp: (WebKit::WebBackForwardList::goToItem): (WebKit::WebBackForwardList::commitProvisionalItem): (WebKit::WebBackForwardList::provisionalItem const): * Source/WebKit/UIProcess/WebBackForwardList.h: * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didCommitLoadForFrame): (WebKit::WebPageProxy::backForwardCommitProvisionalItem): Deleted. * Source/WebKit/UIProcess/WebPageProxy.h: * Source/WebKit/UIProcess/WebPageProxy.messages.in: * Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.cpp: (WebKit::WebBackForwardListProxy::commitProvisionalItem): Deleted. * Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.h: * Source/WebKitLegacy/mac/History/BackForwardList.h: * Tools/TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm: (TEST(WebKit, DecidePolicyForNavigationActionCancelAfterDiscardingForwardItemsWithPSON)): Canonical link: https://commits.webkit.org/291195@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes