WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
315104
[Site Isolation] Decouple BFCache entry lifecycle from frame state side-channel via explicit IPCs
https://bugs.webkit.org/show_bug.cgi?id=315104
Summary
[Site Isolation] Decouple BFCache entry lifecycle from frame state side-chann...
Basuke Suzuki
Reported
2026-05-19 09:21:21 PDT
WebBackForwardCacheEntry creation and removal on UIProcess is currently driven implicitly by the hasCachedPage flag relayed through BackForwardUpdateItem (HistoryItem::notifyChanged → WebHistoryItemClient::historyItemChanged). The WebBackForwardList::backForwardUpdateItem handler observes the diff and creates / removes the entry as a side effect of frame state sync. This side-channel coupling has two problems: (1) the relay carries cache lifecycle state on a wire intended for frame state (URL, scroll position, etc.); (2) the timing of the implicit IPC interleaves with other lifecycle messages in ways that are hard to reason about and have produced ordering hazards. Replace the implicit hasCachedPage diff with explicit IPCs: - DidCacheItem(itemID): WP→UI, fired when BackForwardCache::addIfCacheable succeeds. - DidEvictCachedItem(itemID): WP→UI, fired when BackForwardCache::remove evicts an entry. - DidRestoreFromBackForwardCache(itemID): WP→UI, fired after cachedPage->restore() reinstalls the cached Document. Under Site Isolation with multi-process BFCache enabled, FrameLoader::commitProvisionalLoad uses the frameItemID overloads of addIfCacheable / take to bypass HistoryItem::notifyChanged so the cache lifecycle stays off the implicit relay. Non-SI paths continue to call notifyChanged but UIProcess no longer consults the hasCachedPage flag for cache lifecycle decisions. Foundational refactor for the broader same-site BFCache + cross-site iframe enable. The cross-site iframe BFCache feature itself is NOT enabled by this change — it remains gated until the iframe orchestration foundations and feature enable PRs land. No behavior change. Existing tests must continue to pass.
rdar://177439788
Attachments
Add attachment
proposed patch, testcase, etc.
Basuke Suzuki
Comment 1
2026-05-19 17:29:47 PDT
<
rdar://problem/177439386
>
Basuke Suzuki
Comment 2
2026-05-19 17:30:04 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/65243
EWS
Comment 3
2026-05-20 19:12:06 PDT
Committed
313625@main
(b776e22550fb): <
https://commits.webkit.org/313625@main
> Reviewed commits have been landed. Closing PR #65243 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug