gh-12284: Sync upstream Firefox to version 151.0.2 (gh-13875)

This PR syncs the upstream Firefox to version 151.0.2.

* ⚠️ Some patches did not apply cleanly. Please review them carefully.

@mr-cheffy please review and merge this PR.

---------

Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
This commit is contained in:
mr. m
2026-05-26 23:14:36 +02:00
committed by GitHub
parent 7f08cf437a
commit 1c29206e07
5 changed files with 20 additions and 13 deletions

View File

@@ -1,8 +1,8 @@
diff --git a/browser/modules/URILoadingHelper.sys.mjs b/browser/modules/URILoadingHelper.sys.mjs
index ed6b9fda700b2b4b35836a77a4da953377a72f4b..22acedcf1006f994ec8b6bf8991b4202e12a6f39 100644
index bd2e54e914b171df9b8bcc7dcbc2388e9641f6c6..8b3cb6542bea3fb89e47adc93cb13f94447450e2 100644
--- a/browser/modules/URILoadingHelper.sys.mjs
+++ b/browser/modules/URILoadingHelper.sys.mjs
@@ -224,6 +224,7 @@ function openInWindow(url, params, sourceWindow) {
@@ -228,6 +228,7 @@ function openInWindow(url, params, sourceWindow) {
features,
sa
);
@@ -10,7 +10,7 @@ index ed6b9fda700b2b4b35836a77a4da953377a72f4b..22acedcf1006f994ec8b6bf8991b4202
}
function openInCurrentTab(targetBrowser, url, uriObj, params) {
@@ -541,7 +542,7 @@ export const URILoadingHelper = {
@@ -545,7 +546,7 @@ export const URILoadingHelper = {
// page. If a load request bounces off for the currently selected tab,
// we'll open a new tab instead.
let tab = w.gBrowser.getTabForBrowser(targetBrowser);
@@ -19,7 +19,7 @@ index ed6b9fda700b2b4b35836a77a4da953377a72f4b..22acedcf1006f994ec8b6bf8991b4202
where = "tab";
targetBrowser = null;
} else if (
@@ -974,7 +975,7 @@ export const URILoadingHelper = {
@@ -978,7 +979,7 @@ export const URILoadingHelper = {
ignoreQueryString || replaceQueryString,
ignoreFragmentWhenComparing
);
@@ -28,8 +28,8 @@ index ed6b9fda700b2b4b35836a77a4da953377a72f4b..22acedcf1006f994ec8b6bf8991b4202
for (let i = 0; i < browsers.length; i++) {
let browser = browsers[i];
let browserCompare = cleanURL(
@@ -1026,7 +1027,7 @@ export const URILoadingHelper = {
aSplitView.replaceTab(tabToReplace, tabToMove);
@@ -1034,7 +1035,7 @@ export const URILoadingHelper = {
}
aSplitView.ownerGlobal.focus();
} else {
- aWindow.gBrowser.tabContainer.selectedIndex = i;

View File

@@ -1534,7 +1534,14 @@ class nsZenWindowSync {
window.removeEventListener(eventName, this);
}
delete window.gZenWindowSync;
this.#moveAllActiveTabsToOtherWindowsForClose(window);
const { promise, resolve } = Promise.withResolvers();
this.#docShellSwitchPromise = promise;
try {
this.#moveAllActiveTabsToOtherWindowsForClose(window);
} catch (e) {
console.error(`Error moving active tabs to other windows on close:`, e);
}
resolve();
}
on_WindowCloseAndBrowserFlushed(aBrowsers) {