crashed pages in cache?

4 views
Skip to first unread message

Johann Koenig

unread,
Mar 4, 2021, 1:35:10 AM3/4/21
to bfcac...@chromium.org
Are sad tab pages eligible to be put into bfcache? Is a change like this worthwhile or is there a check at an earlier point which makes it unnecessary?

Alexander Timin

unread,
Mar 4, 2021, 8:25:49 AM3/4/21
to Johann Koenig, bfcache-dev
Hm, that's a really good question — thanks for looking into this!

Overall I have to admit that we haven't thought about this too much and +1 from my side to adding the check and some tests.
 
As far as the details are concerned, we have some logic to evict the pages in the cache when the renderer crashes, but we are not checking for the "is crashed state" when we are storing in the cache.
However, when the RFH crashes, its nav_entry_id will be set to zero and as BackForwardCacheImpl::RestoreEntry uses nav_entry_id for Entry lookup, if the main document crashes, the page wouldn't be restored.
(however, the page with crashed iframes still can be restored from the cache the moment, I think).

So, +1 to fixing this — however, I would recommend avoiding going to WebContents (as WebContents is shared between multiple pages and subframes) and just check for RenderFrameHostImpl::IsRenderFrameLive.    

On Thu, 4 Mar 2021 at 06:35, 'Johann Koenig' via bfcache-dev <bfcac...@chromium.org> wrote:
Are sad tab pages eligible to be put into bfcache? Is a change like this worthwhile or is there a check at an earlier point which makes it unnecessary?

--
You received this message because you are subscribed to the Google Groups "bfcache-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bfcache-dev...@chromium.org.
To view this discussion on the web, visit https://groups.google.com/a/chromium.org/d/msgid/bfcache-dev/CAE%3DFoMTwNK%3DFy79TweHN-z6qHU0A7__ZrqtxwcUFGePP%3DUy75w%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages