This repository has been archived by the owner on Dec 11, 2019. It is now read-only.
Tabs which start at about: urls (like new tab) won't ever be automatically discarded #13547
Labels
Milestone
#13120 fixes and re-introduces tab discarding, with the same logic as previous:
about:newtab
, then we setautoDiscardable: false
in createProperties.The problem here is that some or many or most user tabs will be created with the starting url of
about:newtab
orabout:blank
, which will render the tab discarding feature much less useful if this logic remains.The difficulty to reproduce this is what led to this becoming a hidden bug until now: We created a manual tab discard debug option, which is not impacted by this logic. Automatic tab discarding is affected, and is the purpose of the tab discarding feature.
I will add a logging flag in a potential fix in order to observe when a tab has been discarded.
Test plan / Steps to Reproduce
It is very difficult to reproduce, since one must reproduce with the same conditions neccessary to force the underlying browser to delete a tab's contents due to memory pressure. I have had some luck with the following, on a Windows VM allocated a smaller amount of memory than usual:
about:newtab
homepage)Actual result:
Tab is not discarded (does not reload when visited)
Expected result:
Tab is discarded when not active for some time (reloads when visited). Unfortunately we do not have the equivalent of
chrome://discards
to observe when a tab has been automatically discarded.Reproduces how often:
Brave Version
about:brave info:
0.22.x / master
Potential Solutions
webContents.setAutoDiscardable(bool)
when navigation to a new URL is complete, and follow existingisHttpOrHttps || pinned
logic.about:...
URLs to be auto discardable. (but what about pinned vs non-pinnned?)The text was updated successfully, but these errors were encountered: