1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-08 17:39:59 +02:00

feat: Replace zen's tab unloader with firefox's one. Also added more tests, b=(no-bug), c=common, tabs, tests, glance

This commit is contained in:
Mr. M 2025-05-23 21:01:33 +02:00
parent 6f5d20fd49
commit ebfc885745
No known key found for this signature in database
GPG key ID: 6292C4C8F8652B18
24 changed files with 358 additions and 378 deletions

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
index d5aa64842a35c6697263c63fd3a0571b64b01344..bcae8a44593d7b3e5efdd999b4c2f5bcac221632 100644
index d5aa64842a35c6697263c63fd3a0571b64b01344..6943dc7f1d3d95ab1da315cbdbda0b032cf200f1 100644
--- a/browser/components/tabbrowser/content/tabbrowser.js
+++ b/browser/components/tabbrowser/content/tabbrowser.js
@@ -413,11 +413,41 @@
@ -491,17 +491,6 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..bcae8a44593d7b3e5efdd999b4c2f5bc
if (!this._windowIsClosing) {
if (wasPinned) {
this.tabContainer._positionPinnedTabs();
@@ -5141,8 +5266,8 @@
return closedCount;
}
- async explicitUnloadTabs(tabs) {
- let unloadBlocked = await this.runBeforeUnloadForTabs(tabs);
+ async explicitUnloadTabs(tabs, skipPermitUnload = false) {
+ let unloadBlocked = skipPermitUnload ? false : await this.runBeforeUnloadForTabs(tabs);
if (unloadBlocked) {
return;
}
@@ -5230,6 +5355,7 @@
}