Bug 315298

Summary: [BFCache] Remove unused FrameState::hasCachedPage
Product: WebKit Reporter: Basuke Suzuki <basuke>
Component: New BugsAssignee: Basuke Suzuki <basuke>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Basuke Suzuki
Reported 2026-05-21 09:48:25 PDT
After 313625@main (rdar://177439386), the WebBackForwardCacheEntry lifecycle is driven by explicit IPCs (DidCacheItem / DidEvictCachedItem / DidRestoreFromBackForwardCache) instead of relaying through the FrameState::hasCachedPage snapshot. The boolean flag has one writer and zero readers across C++ and Swift. Remove it from: - Source/WebKit/Shared/SessionState.h (declaration + constructor params) - Source/WebKit/Shared/SessionState.cpp (constructor init/copy) - Source/WebKit/Shared/SessionState.serialization.in (serialization) - Source/WebKit/WebProcess/WebCoreSupport/SessionStateConversion.cpp (writer) HistoryItem::isInBackForwardCache() and hasCachedPageExpired() remain. They are live BackForwardCache queries still used in FrameLoader, the ShouldGoToBackForwardListItem IPC, and the WebKitLegacy _isInBackForwardCache / _hasCachedPageExpired SPI. rdar://177631271
Attachments
Basuke Suzuki
Comment 1 2026-05-21 09:51:06 PDT
EWS
Comment 2 2026-05-21 10:43:24 PDT
Committed 313683@main (211bc109ac55): <https://commits.webkit.org/313683@main> Reviewed commits have been landed. Closing PR #65418 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.