fix: enhance tab unloading logic with permitUnload check and update candidate version and update to firefox 136.0.2

This commit is contained in:
mr. m 2025-03-18 15:46:13 +01:00
parent ad04961d19
commit 025f994c62
No known key found for this signature in database
GPG key ID: 419302196C23B258
8 changed files with 28 additions and 12 deletions

View file

@ -510,6 +510,10 @@
case 'unload-switch':
case 'reset-switch':
case 'switch':
let { permitUnload } = selectedTab.linkedBrowser?.permitUnload();
if (!permitUnload) {
return;
}
this._handleTabSwitch(selectedTab);
if (behavior.includes('reset')) {
this._resetTabToStoredState(selectedTab);
@ -520,8 +524,7 @@
}
// Do not unload about:* pages
if (!selectedTab.linkedBrowser?.currentURI.spec.startsWith('about:')) {
gBrowser.explicitUnloadTabs([selectedTab]);
selectedTab.removeAttribute('linkedpanel');
gZenTabUnloader.explicitUnloadTabs([selectedTab], { permitUnload });
}
}
break;