Closed Lej77 closed 1 year ago
Thanks for the report. Does 334d95b fix the issue? btw, since ATD filters tabs from external requests (HTTP && HTTPS only), I am not sure how the blank one got discarded.
Thanks for the quick follow-up! I tested with ATD.zip
and this issue seems to have been fixed!
The unloading of blank tabs is actually handled by my extension. It has some logic to handle tabs that cannot be unloaded by Auto Tab Discard at line 139 of tab-unloader-for-tree-style-tab/background.js. This affects tabs in private windows (if ATD hasn't been granted permission for private windows) and tabs that have weird URLs such as about:newtab
. My extension's fallback code waits for ATD to finish with the unload request and since that didn't happen the fallback code never unloaded the blank tabs.
Description
My Tab Unloader for Tree Style Tab extension allows unloading tabs by sending a
discard
message to Auto Tab Discard. This has worked really well but I noticed that recently this stopped working for special Firefox tabs such as new tab pages (about:newtab
).I debugged my extension and found that the Auto Tab Discard message was never responded to and therefore the message promise never resolved. I then debugged Auto Tab Discard itself and found that at line 13 of
auto-tab-discard/core.mjs
the message handler throws an error because theurl
property isundefined
.I think this issue should be fixed if a check is added so that
url
is "truthy", for example by changing the condition toBoolean(url) && (url.startsWith('http') || url.startsWith('ftp')) && !discarded && !active
.I thought about working around this in my extension but it doesn't have permission to access URLs so I can't check what tab is being unloaded before sending the message to Auto Tab Discard.
Steps to reproduce
Tab Unloader for Tree Style Tab
's settings page and in theOther Settings
section enable theUnload tabs via the Auto Tab Discard extension
option.Tab Unloader for Tree Style Tab
to unload a "New Tab" page, for example by right clicking on such a tab and selecting theUnload Tab(s)
context menu item.Tab Unloader for Tree Style Tab
's style rules are registered, so might need to disable and re-enableTab Unloader for Tree Style Tab
after installingTree Style Tab
.)Expected result
The "New Tab" page should be unloaded.
Actual result
The "New Tab" remains loaded.
Environment