refactor: make skipPermitUnload a function argument

This commit is contained in:
Slowlife01
2025-04-02 21:48:14 +07:00
parent 853811d387
commit 209428bdc7

View File

@@ -217,8 +217,8 @@
document.getElementById('context_closeDuplicateTabs').parentNode.appendChild(element);
}
unload(tab) {
gBrowser.explicitUnloadTabs([tab], true);
unload(tab, skipPermitUnload = false) {
gBrowser.explicitUnloadTabs([tab], skipPermitUnload);
tab.removeAttribute('linkedpanel');
}
@@ -230,7 +230,7 @@
explicitUnloadTabs(tabs, extraArgs = {}) {
for (let i = 0; i < tabs.length; i++) {
if (this.canUnloadTab(tabs[i], Date.now(), this.intervalUnloader.excludedUrls, true, extraArgs)) {
this.unload(tabs[i]);
this.unload(tabs[i], true);
}
}
}