summaryrefslogtreecommitdiffstats
path: root/browser/modules
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:42 +0000
commitda4c7e7ed675c3bf405668739c3012d140856109 (patch)
treecdd868dba063fecba609a1d819de271f0d51b23e /browser/modules
parentAdding upstream version 125.0.3. (diff)
downloadfirefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz
firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/modules')
-rw-r--r--browser/modules/AboutNewTab.sys.mjs2
-rw-r--r--browser/modules/AsyncTabSwitcher.sys.mjs2
-rw-r--r--browser/modules/BackgroundTask_install.sys.mjs2
-rw-r--r--browser/modules/BackgroundTask_uninstall.sys.mjs2
-rw-r--r--browser/modules/BrowserUsageTelemetry.sys.mjs2
-rw-r--r--browser/modules/BrowserWindowTracker.sys.mjs2
-rw-r--r--browser/modules/ContentCrashHandlers.sys.mjs4
-rw-r--r--browser/modules/EveryWindow.sys.mjs2
-rw-r--r--browser/modules/ExtensionsUI.sys.mjs2
-rw-r--r--browser/modules/FaviconLoader.sys.mjs2
-rw-r--r--browser/modules/HomePage.sys.mjs2
-rw-r--r--browser/modules/PageActions.sys.mjs2
-rw-r--r--browser/modules/PermissionUI.sys.mjs8
-rw-r--r--browser/modules/ProcessHangMonitor.sys.mjs9
-rw-r--r--browser/modules/Sanitizer.sys.mjs28
-rw-r--r--browser/modules/SiteDataManager.sys.mjs45
-rw-r--r--browser/modules/SitePermissions.sys.mjs2
-rw-r--r--browser/modules/TabUnloader.sys.mjs2
-rw-r--r--browser/modules/TabsList.sys.mjs2
-rw-r--r--browser/modules/WindowsJumpLists.sys.mjs6
-rw-r--r--browser/modules/WindowsPreviewPerTab.sys.mjs6
-rw-r--r--browser/modules/ZoomUI.sys.mjs4
-rw-r--r--browser/modules/test/browser/browser_PageActions.js6
-rw-r--r--browser/modules/test/browser/browser_ProcessHangNotifications.js7
-rw-r--r--browser/modules/test/browser/browser_UnsubmittedCrashHandler.js2
-rw-r--r--browser/modules/test/browser/browser_UsageTelemetry_interaction.js16
-rw-r--r--browser/modules/test/browser/browser_UsageTelemetry_private_and_restore.js2
-rw-r--r--browser/modules/test/browser/browser_preloading_tab_moving.js2
-rw-r--r--browser/modules/test/browser/formValidation/browser_form_validation.js8
-rw-r--r--browser/modules/test/browser/head.js2
-rw-r--r--browser/modules/test/unit/test_FirefoxBridgeExtensionUtils.js2
-rw-r--r--browser/modules/webrtcUI.sys.mjs4
32 files changed, 72 insertions, 117 deletions
diff --git a/browser/modules/AboutNewTab.sys.mjs b/browser/modules/AboutNewTab.sys.mjs
index bff8bd3ce4..979c3adf12 100644
--- a/browser/modules/AboutNewTab.sys.mjs
+++ b/browser/modules/AboutNewTab.sys.mjs
@@ -227,7 +227,7 @@ export const AboutNewTab = {
// nsIObserver implementation
- observe(subject, topic, data) {
+ observe(subject, topic) {
switch (topic) {
case TOPIC_APP_QUIT: {
// We defer to this to the next tick of the event loop since the
diff --git a/browser/modules/AsyncTabSwitcher.sys.mjs b/browser/modules/AsyncTabSwitcher.sys.mjs
index 4ecdcf7882..9f4aa535e0 100644
--- a/browser/modules/AsyncTabSwitcher.sys.mjs
+++ b/browser/modules/AsyncTabSwitcher.sys.mjs
@@ -846,7 +846,7 @@ export class AsyncTabSwitcher {
// Called when a tab has been removed, and the browser node is
// about to be removed from the DOM.
- onTabRemovedImpl(tab) {
+ onTabRemovedImpl() {
this.lastVisibleTab = null;
}
diff --git a/browser/modules/BackgroundTask_install.sys.mjs b/browser/modules/BackgroundTask_install.sys.mjs
index 8f13aa8789..510e14bccb 100644
--- a/browser/modules/BackgroundTask_install.sys.mjs
+++ b/browser/modules/BackgroundTask_install.sys.mjs
@@ -15,7 +15,7 @@
// it.
export const backgroundTaskTimeoutSec = 30;
-export async function runBackgroundTask(commandLine) {
+export async function runBackgroundTask() {
console.log("Running BackgroundTask_install.");
console.log("Cleaning up update files.");
diff --git a/browser/modules/BackgroundTask_uninstall.sys.mjs b/browser/modules/BackgroundTask_uninstall.sys.mjs
index 9e51248438..f2fc9a0f8c 100644
--- a/browser/modules/BackgroundTask_uninstall.sys.mjs
+++ b/browser/modules/BackgroundTask_uninstall.sys.mjs
@@ -12,7 +12,7 @@
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
-export async function runBackgroundTask(commandLine) {
+export async function runBackgroundTask() {
console.log("Running BackgroundTask_uninstall.");
if (AppConstants.platform === "win") {
diff --git a/browser/modules/BrowserUsageTelemetry.sys.mjs b/browser/modules/BrowserUsageTelemetry.sys.mjs
index 410d1e2ea3..955a3338ec 100644
--- a/browser/modules/BrowserUsageTelemetry.sys.mjs
+++ b/browser/modules/BrowserUsageTelemetry.sys.mjs
@@ -1069,7 +1069,7 @@ export let BrowserUsageTelemetry = {
this._recordTabCounts({ tabCount, loadedTabCount });
},
- _onTabPinned(target) {
+ _onTabPinned() {
const pinnedTabs = getPinnedTabsCount();
// Update the "tab pinned" count and its maximum.
diff --git a/browser/modules/BrowserWindowTracker.sys.mjs b/browser/modules/BrowserWindowTracker.sys.mjs
index cead9df7ba..b6e3ad2eea 100644
--- a/browser/modules/BrowserWindowTracker.sys.mjs
+++ b/browser/modules/BrowserWindowTracker.sys.mjs
@@ -244,7 +244,7 @@ export const BrowserWindowTracker = {
// Prevent leaks in case the window closes before we track it as an open
// window.
const topic = "browsing-context-discarded";
- const observer = (aSubject, aTopic, aData) => {
+ const observer = aSubject => {
if (window.browsingContext == aSubject) {
let pending = this.pendingWindows.get(window);
if (pending) {
diff --git a/browser/modules/ContentCrashHandlers.sys.mjs b/browser/modules/ContentCrashHandlers.sys.mjs
index 4ab6f600cd..cd8dfc04c6 100644
--- a/browser/modules/ContentCrashHandlers.sys.mjs
+++ b/browser/modules/ContentCrashHandlers.sys.mjs
@@ -94,7 +94,7 @@ export var TabCrashHandler = {
Services.obs.addObserver(this, "oop-frameloader-crashed");
},
- observe(aSubject, aTopic, aData) {
+ observe(aSubject, aTopic) {
switch (aTopic) {
case "ipc:content-shutdown": {
aSubject.QueryInterface(Ci.nsIPropertyBag2);
@@ -845,7 +845,7 @@ export var UnsubmittedCrashHandler = {
Services.obs.removeObserver(this, "profile-before-change");
},
- observe(subject, topic, data) {
+ observe(subject, topic) {
switch (topic) {
case "profile-before-change": {
this.uninit();
diff --git a/browser/modules/EveryWindow.sys.mjs b/browser/modules/EveryWindow.sys.mjs
index 704240b54f..64e7cbaa31 100644
--- a/browser/modules/EveryWindow.sys.mjs
+++ b/browser/modules/EveryWindow.sys.mjs
@@ -64,7 +64,7 @@ export const EveryWindow = {
if (!initialized) {
let addUnloadListener = win => {
- function observer(subject, topic, data) {
+ function observer(subject, topic) {
if (topic == "domwindowclosed" && subject === win) {
Services.ww.unregisterNotification(observer);
for (let c of callbacks.values()) {
diff --git a/browser/modules/ExtensionsUI.sys.mjs b/browser/modules/ExtensionsUI.sys.mjs
index 0b113f87ce..6b2781670a 100644
--- a/browser/modules/ExtensionsUI.sys.mjs
+++ b/browser/modules/ExtensionsUI.sys.mjs
@@ -185,7 +185,7 @@ export var ExtensionsUI = {
);
},
- observe(subject, topic, data) {
+ observe(subject, topic) {
if (topic == "webextension-permission-prompt") {
let { target, info } = subject.wrappedJSObject;
diff --git a/browser/modules/FaviconLoader.sys.mjs b/browser/modules/FaviconLoader.sys.mjs
index 5012ee2c8c..7e28b5d026 100644
--- a/browser/modules/FaviconLoader.sys.mjs
+++ b/browser/modules/FaviconLoader.sys.mjs
@@ -188,7 +188,7 @@ class FaviconLoad {
this.channel.cancel(Cr.NS_BINDING_ABORTED);
}
- onStartRequest(request) {}
+ onStartRequest() {}
onDataAvailable(request, inputStream, offset, count) {
this.stream.writeFrom(inputStream, count);
diff --git a/browser/modules/HomePage.sys.mjs b/browser/modules/HomePage.sys.mjs
index f8f27d9bd9..612e559e2c 100644
--- a/browser/modules/HomePage.sys.mjs
+++ b/browser/modules/HomePage.sys.mjs
@@ -308,7 +308,7 @@ export let HomePage = {
}
},
- onWidgetRemoved(widgetId, area) {
+ onWidgetRemoved(widgetId) {
if (widgetId == kWidgetId) {
Services.prefs.setBoolPref(kWidgetRemovedPref, true);
lazy.CustomizableUI.removeListener(this);
diff --git a/browser/modules/PageActions.sys.mjs b/browser/modules/PageActions.sys.mjs
index f5951142dd..2a900c21f0 100644
--- a/browser/modules/PageActions.sys.mjs
+++ b/browser/modules/PageActions.sys.mjs
@@ -1184,7 +1184,7 @@ PageActions._initBuiltInActions = function () {
browserPageActions(buttonNode).bookmark.onShowingInPanel(buttonNode);
},
onCommand(event, buttonNode) {
- browserPageActions(buttonNode).bookmark.onCommand(event, buttonNode);
+ browserPageActions(buttonNode).bookmark.onCommand(event);
},
},
];
diff --git a/browser/modules/PermissionUI.sys.mjs b/browser/modules/PermissionUI.sys.mjs
index e94beb79ac..b4feb7f0c9 100644
--- a/browser/modules/PermissionUI.sys.mjs
+++ b/browser/modules/PermissionUI.sys.mjs
@@ -530,7 +530,7 @@ class PermissionPrompt {
let action = {
label: promptAction.label,
accessKey: promptAction.accessKey,
- callback: state => {
+ callback: () => {
if (promptAction.callback) {
promptAction.callback();
}
@@ -725,7 +725,7 @@ class SitePermsAddonInstallRequest extends PermissionPromptForRequest {
* @param {Components.Exception} err
* @returns {String} The error message
*/
- getInstallErrorMessage(err) {
+ getInstallErrorMessage() {
return null;
}
}
@@ -1397,7 +1397,7 @@ class StorageAccessPermissionPrompt extends PermissionPromptForRequest {
"storageAccess1.Allow.accesskey"
),
action: Ci.nsIPermissionManager.ALLOW_ACTION,
- callback(state) {
+ callback() {
self.allow({ "storage-access": "allow" });
},
},
@@ -1409,7 +1409,7 @@ class StorageAccessPermissionPrompt extends PermissionPromptForRequest {
"storageAccess1.DontAllow.accesskey"
),
action: Ci.nsIPermissionManager.DENY_ACTION,
- callback(state) {
+ callback() {
self.cancel();
},
},
diff --git a/browser/modules/ProcessHangMonitor.sys.mjs b/browser/modules/ProcessHangMonitor.sys.mjs
index f0939449c9..e0f91cdf93 100644
--- a/browser/modules/ProcessHangMonitor.sys.mjs
+++ b/browser/modules/ProcessHangMonitor.sys.mjs
@@ -210,7 +210,7 @@ export var ProcessHangMonitor = {
return func(report);
},
- observe(subject, topic, data) {
+ observe(subject, topic) {
switch (topic) {
case "xpcom-shutdown": {
Services.obs.removeObserver(this, "xpcom-shutdown");
@@ -240,7 +240,7 @@ export var ProcessHangMonitor = {
// Install event listeners on the new window in case one of
// its tabs is already hung.
let win = subject;
- let listener = ev => {
+ let listener = () => {
win.removeEventListener("load", listener, true);
this.updateWindows();
};
@@ -548,10 +548,11 @@ export var ProcessHangMonitor = {
return;
}
- // Show the "debug script" button unconditionally if we are in Developer edition,
- // or, if DevTools are opened on the slow tab.
+ // Show the "debug script" button unconditionally if we are in Developer or Nightly
+ // editions, or if DevTools are opened on the slow tab.
if (
AppConstants.MOZ_DEV_EDITION ||
+ AppConstants.NIGHTLY_BUILD ||
report.scriptBrowser.browsingContext.watchedByDevTools
) {
buttons.push({
diff --git a/browser/modules/Sanitizer.sys.mjs b/browser/modules/Sanitizer.sys.mjs
index 13b7a307ea..3b0f960d18 100644
--- a/browser/modules/Sanitizer.sys.mjs
+++ b/browser/modules/Sanitizer.sys.mjs
@@ -24,7 +24,7 @@ XPCOMUtils.defineLazyPreferenceGetter(
);
var logConsole;
-function log(msg) {
+function log(...msgs) {
if (!logConsole) {
logConsole = console.createInstance({
prefix: "Sanitizer",
@@ -32,7 +32,7 @@ function log(msg) {
});
}
- logConsole.log(msg);
+ logConsole.log(...msgs);
}
// Used as unique id for pending sanitizations.
@@ -164,6 +164,7 @@ export var Sanitizer = {
// First, collect pending sanitizations from the last session, before we
// add pending sanitizations for this session.
let pendingSanitizations = getAndClearPendingSanitizations();
+ log("Pending sanitizations:", pendingSanitizations);
// Check if we should sanitize on shutdown.
this.shouldSanitizeOnShutdown = Services.prefs.getBoolPref(
@@ -759,7 +760,7 @@ export var Sanitizer = {
// closes) and/or run too late (and not have a fully-formed window yet
// in existence). See bug 1088137.
let newWindowOpened = false;
- let onWindowOpened = function (subject, topic, data) {
+ let onWindowOpened = function (subject) {
if (subject != newWindow) {
return;
}
@@ -811,7 +812,7 @@ export var Sanitizer = {
},
pluginData: {
- async clear(range) {},
+ async clear() {},
},
// Combine History and Form Data clearing for the
@@ -923,25 +924,13 @@ export var Sanitizer = {
await maybeSanitizeSessionPrincipals(
progress,
principalsForShutdownClearing,
- Ci.nsIClearDataService.CLEAR_COOKIES |
- Ci.nsIClearDataService.CLEAR_COOKIE_BANNER_EXECUTED_RECORD |
- Ci.nsIClearDataService.CLEAR_DOM_STORAGES |
- Ci.nsIClearDataService.CLEAR_AUTH_TOKENS |
- Ci.nsIClearDataService.CLEAR_AUTH_CACHE |
- Ci.nsIClearDataService.CLEAR_FINGERPRINTING_PROTECTION_STATE |
- Ci.nsIClearDataService.CLEAR_BOUNCE_TRACKING_PROTECTION_STATE
+ Ci.nsIClearDataService.CLEAR_COOKIES_AND_SITE_DATA
);
} else {
// Not on shutdown
await clearData(
range,
- Ci.nsIClearDataService.CLEAR_COOKIES |
- Ci.nsIClearDataService.CLEAR_COOKIE_BANNER_EXECUTED_RECORD |
- Ci.nsIClearDataService.CLEAR_DOM_STORAGES |
- Ci.nsIClearDataService.CLEAR_AUTH_TOKENS |
- Ci.nsIClearDataService.CLEAR_AUTH_CACHE |
- Ci.nsIClearDataService.CLEAR_FINGERPRINTING_PROTECTION_STATE |
- Ci.nsIClearDataService.CLEAR_BOUNCE_TRACKING_PROTECTION_STATE
+ Ci.nsIClearDataService.CLEAR_COOKIES_AND_SITE_DATA
);
}
await clearData(range, Ci.nsIClearDataService.CLEAR_MEDIA_DEVICES);
@@ -1018,6 +1007,7 @@ async function sanitizeInternal(items, aItemsToClear, options) {
// Array of objects in form { name, promise }.
// `name` is the item's name and `promise` may be a promise, if the
// sanitization is asynchronous, or the function return value, otherwise.
+ log("Running sanitization for:", itemsToClear);
let handles = [];
for (let name of itemsToClear) {
progress[name] = "blocking";
@@ -1046,7 +1036,7 @@ async function sanitizeInternal(items, aItemsToClear, options) {
}
await Promise.all(handles.map(h => h.promise));
- // Sanitization is complete.
+ log("All sanitizations are complete");
TelemetryStopwatch.finish("FX_SANITIZE_TOTAL", refObj);
if (!progress.isShutdown) {
removePendingSanitization(uid);
diff --git a/browser/modules/SiteDataManager.sys.mjs b/browser/modules/SiteDataManager.sys.mjs
index c5569afc82..082d250ddc 100644
--- a/browser/modules/SiteDataManager.sys.mjs
+++ b/browser/modules/SiteDataManager.sys.mjs
@@ -504,23 +504,6 @@ export var SiteDataManager = {
site.cookies = [];
},
- // Returns a list of permissions from the permission manager that
- // we consider part of "site data and cookies".
- _getDeletablePermissions() {
- let perms = [];
-
- for (let permission of Services.perms.all) {
- if (
- permission.type == "persistent-storage" ||
- permission.type == "storage-access"
- ) {
- perms.push(permission);
- }
- }
-
- return perms;
- },
-
/**
* Removes all site data for the specified list of domains and hosts.
* This includes site data of subdomains belonging to the domains or hosts and
@@ -542,7 +525,7 @@ export var SiteDataManager = {
if (!Array.isArray(domainsOrHosts)) {
domainsOrHosts = [domainsOrHosts];
}
- let perms = this._getDeletablePermissions();
+
let promises = [];
for (let domainOrHost of domainsOrHosts) {
const kFlags =
@@ -552,7 +535,8 @@ export var SiteDataManager = {
Ci.nsIClearDataService.CLEAR_ALL_CACHES |
Ci.nsIClearDataService.CLEAR_COOKIE_BANNER_EXECUTED_RECORD |
Ci.nsIClearDataService.CLEAR_FINGERPRINTING_PROTECTION_STATE |
- Ci.nsIClearDataService.CLEAR_BOUNCE_TRACKING_PROTECTION_STATE;
+ Ci.nsIClearDataService.CLEAR_BOUNCE_TRACKING_PROTECTION_STATE |
+ Ci.nsIClearDataService.CLEAR_STORAGE_PERMISSIONS;
promises.push(
new Promise(function (resolve) {
const { clearData } = Services;
@@ -580,19 +564,6 @@ export var SiteDataManager = {
}
})
);
-
- for (let perm of perms) {
- // Specialcase local file permissions.
- if (!domainOrHost) {
- if (perm.principal.schemeIs("file")) {
- Services.perms.removePermission(perm);
- }
- } else if (
- Services.eTLD.hasRootDomain(perm.principal.host, domainOrHost)
- ) {
- Services.perms.removePermission(perm);
- }
- }
}
await Promise.all(promises);
@@ -687,19 +658,11 @@ export var SiteDataManager = {
async removeSiteData() {
await new Promise(function (resolve) {
Services.clearData.deleteData(
- Ci.nsIClearDataService.CLEAR_COOKIES |
- Ci.nsIClearDataService.CLEAR_DOM_STORAGES |
- Ci.nsIClearDataService.CLEAR_HSTS |
- Ci.nsIClearDataService.CLEAR_EME |
- Ci.nsIClearDataService.CLEAR_BOUNCE_TRACKING_PROTECTION_STATE,
+ Ci.nsIClearDataService.CLEAR_COOKIES_AND_SITE_DATA,
resolve
);
});
- for (let permission of this._getDeletablePermissions()) {
- Services.perms.removePermission(permission);
- }
-
return this.updateSites();
},
};
diff --git a/browser/modules/SitePermissions.sys.mjs b/browser/modules/SitePermissions.sys.mjs
index 2f3f9210e2..8e1aa77871 100644
--- a/browser/modules/SitePermissions.sys.mjs
+++ b/browser/modules/SitePermissions.sys.mjs
@@ -630,7 +630,7 @@ export var SitePermissions = {
* @param {string} latest
* The latest value of the preference
*/
- invalidatePermissionList(data, previous, latest) {
+ invalidatePermissionList() {
// Ensure that listPermissions() will reconstruct its return value the next
// time it's called.
this._permissionsArray = null;
diff --git a/browser/modules/TabUnloader.sys.mjs b/browser/modules/TabUnloader.sys.mjs
index a0c1233f27..2bd6097b5d 100644
--- a/browser/modules/TabUnloader.sys.mjs
+++ b/browser/modules/TabUnloader.sys.mjs
@@ -63,7 +63,7 @@ let DefaultTabUnloaderMethods = {
return tab.pinned ? weight : 0;
},
- isLoading(tab, weight) {
+ isLoading() {
return 0;
},
diff --git a/browser/modules/TabsList.sys.mjs b/browser/modules/TabsList.sys.mjs
index 9e6c36f4a8..44878afb8f 100644
--- a/browser/modules/TabsList.sys.mjs
+++ b/browser/modules/TabsList.sys.mjs
@@ -100,7 +100,7 @@ class TabsListBase {
/*
* Populate the popup with menuitems and setup the listeners.
*/
- _populate(event) {
+ _populate() {
let fragment = this.doc.createDocumentFragment();
for (let tab of this.gBrowser.tabs) {
diff --git a/browser/modules/WindowsJumpLists.sys.mjs b/browser/modules/WindowsJumpLists.sys.mjs
index 9015527423..a4493fc591 100644
--- a/browser/modules/WindowsJumpLists.sys.mjs
+++ b/browser/modules/WindowsJumpLists.sys.mjs
@@ -560,7 +560,7 @@ var Builder = class {
aError.message
);
},
- handleCompletion(aReason) {
+ handleCompletion() {
aCallback.call(aScope, null);
},
});
@@ -815,7 +815,7 @@ export var WinTaskbarJumpList = {
name: "WinTaskbarJumpList",
- notify: function WTBJL_notify(aTimer) {
+ notify: function WTBJL_notify() {
// Add idle observer on the first notification so it doesn't hit startup.
this._updateIdleObserver();
Services.tm.idleDispatchToMainThread(() => {
@@ -823,7 +823,7 @@ export var WinTaskbarJumpList = {
});
},
- observe: function WTBJL_observe(aSubject, aTopic, aData) {
+ observe: function WTBJL_observe(aSubject, aTopic) {
switch (aTopic) {
case "nsPref:changed":
if (this._enabled && !lazy._prefs.getBoolPref(PREF_TASKBAR_ENABLED)) {
diff --git a/browser/modules/WindowsPreviewPerTab.sys.mjs b/browser/modules/WindowsPreviewPerTab.sys.mjs
index c0ef87fe8b..1dd226ec02 100644
--- a/browser/modules/WindowsPreviewPerTab.sys.mjs
+++ b/browser/modules/WindowsPreviewPerTab.sys.mjs
@@ -88,7 +88,7 @@ function _imageFromURI(uri, privateMode, callback) {
}
const decodeCallback = {
- onImageReady(image, status) {
+ onImageReady(image) {
if (!image) {
// We failed, so use the default favicon (only if this wasn't the
// default favicon).
@@ -589,13 +589,13 @@ TabWindow.prototype = {
// Browser progress listener
- onLocationChange(aBrowser) {
+ onLocationChange() {
// I'm not sure we need this, onStateChange does a really good job
// of picking up page changes.
// this.invalidateTabPreview(aBrowser);
},
- onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
+ onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags) {
if (
aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK
diff --git a/browser/modules/ZoomUI.sys.mjs b/browser/modules/ZoomUI.sys.mjs
index 2e32ba46ec..d0ff9c7188 100644
--- a/browser/modules/ZoomUI.sys.mjs
+++ b/browser/modules/ZoomUI.sys.mjs
@@ -64,7 +64,7 @@ export var ZoomUI = {
value = parseFloat(pref.value);
}
},
- handleCompletion(reason) {
+ handleCompletion() {
resolve(value);
},
handleError(error) {
@@ -75,7 +75,7 @@ export var ZoomUI = {
},
};
-function fullZoomLocationChangeObserver(aSubject, aTopic) {
+function fullZoomLocationChangeObserver(aSubject) {
// If the tab was the last one in its window and has been dragged to another
// window, the original browser's window will be unavailable here. Since that
// window is closing, we can just ignore this notification.
diff --git a/browser/modules/test/browser/browser_PageActions.js b/browser/modules/test/browser/browser_PageActions.js
index 4f86962a01..c40bfd97d7 100644
--- a/browser/modules/test/browser/browser_PageActions.js
+++ b/browser/modules/test/browser/browser_PageActions.js
@@ -578,7 +578,7 @@ add_task(async function withIframe() {
pinnedToUrlbar: true,
title: "Test iframe",
wantsIframe: true,
- onCommand(event, buttonNode) {
+ onCommand() {
onCommandCallCount++;
},
onIframeShowing(iframeNode, panelNode) {
@@ -1171,10 +1171,10 @@ add_task(async function transient() {
id: "test-transient",
title: "Test transient",
_transient: true,
- onPlacedInPanel(buttonNode) {
+ onPlacedInPanel() {
onPlacedInPanelCount++;
},
- onBeforePlacedInWindow(win) {
+ onBeforePlacedInWindow() {
onBeforePlacedInWindowCount++;
},
})
diff --git a/browser/modules/test/browser/browser_ProcessHangNotifications.js b/browser/modules/test/browser/browser_ProcessHangNotifications.js
index d176f911ef..9150c36d4c 100644
--- a/browser/modules/test/browser/browser_ProcessHangNotifications.js
+++ b/browser/modules/test/browser/browser_ProcessHangNotifications.js
@@ -2,7 +2,7 @@
const { WebExtensionPolicy } = Cu.getGlobalForObject(Services);
-function promiseNotificationShown(aWindow, aName) {
+function promiseNotificationShown(aWindow) {
return new Promise(resolve => {
let notificationBox = aWindow.gNotificationBox;
notificationBox.stack.addEventListener(
@@ -52,7 +52,7 @@ let TestHangReport = function (
hangType = SLOW_SCRIPT,
browser = gBrowser.selectedBrowser
) {
- this.promise = new Promise((resolve, reject) => {
+ this.promise = new Promise(resolve => {
this._resolver = resolve;
});
@@ -98,7 +98,8 @@ TestHangReport.prototype = {
};
// on dev edition we add a button for js debugging of hung scripts.
-let buttonCount = AppConstants.MOZ_DEV_EDITION ? 2 : 1;
+let buttonCount =
+ AppConstants.MOZ_DEV_EDITION || AppConstants.NIGHTLY_BUILD ? 2 : 1;
add_setup(async function () {
// Create a fake WebExtensionPolicy that we can use for
diff --git a/browser/modules/test/browser/browser_UnsubmittedCrashHandler.js b/browser/modules/test/browser/browser_UnsubmittedCrashHandler.js
index 4305d7f7df..6300bd17ba 100644
--- a/browser/modules/test/browser/browser_UnsubmittedCrashHandler.js
+++ b/browser/modules/test/browser/browser_UnsubmittedCrashHandler.js
@@ -98,7 +98,7 @@ function createPendingCrashReports(howMany, accessDate) {
};
let uuidGenerator = Services.uuid;
- // Some annotations are always present in the .extra file and CrashSubmit.jsm
+ // Some annotations are always present in the .extra file and CrashSubmit.sys.mjs
// expects there to be a ServerURL entry, so we'll add them here.
let extraFileContents = JSON.stringify({
ServerURL: SERVER_URL,
diff --git a/browser/modules/test/browser/browser_UsageTelemetry_interaction.js b/browser/modules/test/browser/browser_UsageTelemetry_interaction.js
index 2bc60d9697..5fa436a349 100644
--- a/browser/modules/test/browser/browser_UsageTelemetry_interaction.js
+++ b/browser/modules/test/browser/browser_UsageTelemetry_interaction.js
@@ -316,7 +316,7 @@ add_task(async function contextMenu_entrypoints() {
});
add_task(async function appMenu() {
- await BrowserTestUtils.withNewTab("https://example.com", async browser => {
+ await BrowserTestUtils.withNewTab("https://example.com", async () => {
Services.telemetry.getSnapshotForKeyedScalars("main", true);
let shown = BrowserTestUtils.waitForEvent(
@@ -348,7 +348,7 @@ add_task(async function appMenu() {
});
add_task(async function devtools() {
- await BrowserTestUtils.withNewTab("https://example.com", async browser => {
+ await BrowserTestUtils.withNewTab("https://example.com", async () => {
Services.telemetry.getSnapshotForKeyedScalars("main", true);
let shown = BrowserTestUtils.waitForEvent(
@@ -667,7 +667,7 @@ add_task(async function mainMenu() {
BrowserUsageTelemetry._resetAddonIds();
- await BrowserTestUtils.withNewTab("https://example.com", async browser => {
+ await BrowserTestUtils.withNewTab("https://example.com", async () => {
Services.telemetry.getSnapshotForKeyedScalars("main", true);
CustomizableUI.setToolbarVisibility("toolbar-menubar", true);
@@ -702,7 +702,7 @@ add_task(async function preferences() {
? "sync-pane-loaded"
: "privacy-pane-loaded";
let finalPrefPaneLoaded = TestUtils.topicObserved(finalPaneEvent, () => true);
- await BrowserTestUtils.withNewTab("about:preferences", async browser => {
+ await BrowserTestUtils.withNewTab("about:preferences", async () => {
await finalPrefPaneLoaded;
Services.telemetry.getSnapshotForKeyedScalars("main", true);
@@ -778,7 +778,7 @@ async function openLinkUsingContextMenu(link) {
}
async function history_appMenu(useContextClick) {
- await BrowserTestUtils.withNewTab("https://example.com", async browser => {
+ await BrowserTestUtils.withNewTab("https://example.com", async () => {
let shown = BrowserTestUtils.waitForEvent(
elem("appMenu-popup"),
"popupshown"
@@ -819,7 +819,7 @@ add_task(async function history_appMenu_context_click() {
});
async function bookmarks_appMenu(useContextClick) {
- await BrowserTestUtils.withNewTab("https://example.com", async browser => {
+ await BrowserTestUtils.withNewTab("https://example.com", async () => {
let shown = BrowserTestUtils.waitForEvent(
elem("appMenu-popup"),
"popupshown"
@@ -865,7 +865,7 @@ add_task(async function bookmarks_appMenu_context_click() {
});
async function bookmarks_library_navbar(useContextClick) {
- await BrowserTestUtils.withNewTab("https://example.com", async browser => {
+ await BrowserTestUtils.withNewTab("https://example.com", async () => {
CustomizableUI.addWidgetToArea("library-button", "nav-bar");
let button = document.getElementById("library-button");
button.click();
@@ -908,7 +908,7 @@ add_task(async function bookmarks_library_navbar_context_click() {
});
async function history_library_navbar(useContextClick) {
- await BrowserTestUtils.withNewTab("https://example.com", async browser => {
+ await BrowserTestUtils.withNewTab("https://example.com", async () => {
CustomizableUI.addWidgetToArea("library-button", "nav-bar");
let button = document.getElementById("library-button");
button.click();
diff --git a/browser/modules/test/browser/browser_UsageTelemetry_private_and_restore.js b/browser/modules/test/browser/browser_UsageTelemetry_private_and_restore.js
index 89222739be..94447c69ae 100644
--- a/browser/modules/test/browser/browser_UsageTelemetry_private_and_restore.js
+++ b/browser/modules/test/browser/browser_UsageTelemetry_private_and_restore.js
@@ -19,7 +19,7 @@ registerCleanupFunction(() => {
function promiseBrowserStateRestored() {
return new Promise(resolve => {
- Services.obs.addObserver(function observer(aSubject, aTopic) {
+ Services.obs.addObserver(function observer() {
Services.obs.removeObserver(
observer,
"sessionstore-browser-state-restored"
diff --git a/browser/modules/test/browser/browser_preloading_tab_moving.js b/browser/modules/test/browser/browser_preloading_tab_moving.js
index ce7cba9e85..1118657980 100644
--- a/browser/modules/test/browser/browser_preloading_tab_moving.js
+++ b/browser/modules/test/browser/browser_preloading_tab_moving.js
@@ -27,7 +27,7 @@ async function promiseNewTabLoadedInBrowser(browser) {
info(`Waiting for ${url} to be the location for the browser.`);
await new Promise(resolve => {
let progressListener = {
- onLocationChange(aWebProgress, aRequest, aLocationURI, aFlags) {
+ onLocationChange(aWebProgress, aRequest, aLocationURI) {
if (!url || aLocationURI.spec == url) {
browser.removeProgressListener(progressListener);
resolve();
diff --git a/browser/modules/test/browser/formValidation/browser_form_validation.js b/browser/modules/test/browser/formValidation/browser_form_validation.js
index 6348546c80..8e0584269f 100644
--- a/browser/modules/test/browser/formValidation/browser_form_validation.js
+++ b/browser/modules/test/browser/formValidation/browser_form_validation.js
@@ -161,7 +161,7 @@ add_task(async function () {
await clickChildElement(browser);
- await new Promise((resolve, reject) => {
+ await new Promise(resolve => {
// XXXndeakin This isn't really going to work when the content is another process
executeSoon(function () {
checkPopupHide();
@@ -289,7 +289,7 @@ add_task(async function () {
gInvalidFormPopup.firstElementChild.textContent
);
- await new Promise((resolve, reject) => {
+ await new Promise(resolve => {
EventUtils.sendString("a");
executeSoon(function () {
checkPopupShow(anchorRect);
@@ -475,7 +475,7 @@ add_task(async function () {
// Now, the element suffers from another error, the message should have
// been updated.
- await new Promise((resolve, reject) => {
+ await new Promise(resolve => {
// XXXndeakin This isn't really going to work when the content is another process
executeSoon(function () {
checkChildFocus(browser, gInvalidFormPopup.firstElementChild.textContent);
@@ -515,7 +515,7 @@ add_task(async function () {
gInvalidFormPopup,
"popuphidden"
);
- BrowserReloadSkipCache();
+ BrowserCommands.reloadSkipCache();
await popupHiddenPromise;
gBrowser.removeCurrentTab();
diff --git a/browser/modules/test/browser/head.js b/browser/modules/test/browser/head.js
index f852cdd641..da82fa1c39 100644
--- a/browser/modules/test/browser/head.js
+++ b/browser/modules/test/browser/head.js
@@ -95,7 +95,7 @@ function makeMockPermissionRequest(browser) {
allow() {
this._allowed = true;
},
- getDelegatePrincipal(aType) {
+ getDelegatePrincipal() {
return principal;
},
QueryInterface: ChromeUtils.generateQI(["nsIContentPermissionRequest"]),
diff --git a/browser/modules/test/unit/test_FirefoxBridgeExtensionUtils.js b/browser/modules/test/unit/test_FirefoxBridgeExtensionUtils.js
index 1273ee950b..77db0d8286 100644
--- a/browser/modules/test/unit/test_FirefoxBridgeExtensionUtils.js
+++ b/browser/modules/test/unit/test_FirefoxBridgeExtensionUtils.js
@@ -39,7 +39,7 @@ class StubbedRegistryKey {
this.#children = new Map(this.#originalChildren);
}
- open(accessLevel) {
+ open(_accessLevel) {
this.#openedForRead = true;
}
diff --git a/browser/modules/webrtcUI.sys.mjs b/browser/modules/webrtcUI.sys.mjs
index 384cec16af..f270f89d77 100644
--- a/browser/modules/webrtcUI.sys.mjs
+++ b/browser/modules/webrtcUI.sys.mjs
@@ -112,7 +112,7 @@ export var webrtcUI = {
}
},
- observe(subject, topic, data) {
+ observe(subject, topic) {
if (topic == "browser-delayed-startup-finished") {
if (webrtcUI.showGlobalIndicator) {
showOrCreateMenuForWindow(subject);
@@ -1106,7 +1106,7 @@ function onTabSharingMenuPopupShowing(e) {
}
}
-function onTabSharingMenuPopupHiding(e) {
+function onTabSharingMenuPopupHiding() {
while (this.lastChild) {
this.lastChild.remove();
}