summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/update
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
commit086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch)
treea4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /toolkit/mozapps/update
parentAdding debian version 124.0.1-1. (diff)
downloadfirefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz
firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/mozapps/update')
-rw-r--r--toolkit/mozapps/update/AppUpdater.sys.mjs14
-rw-r--r--toolkit/mozapps/update/BackgroundUpdate.sys.mjs2
-rw-r--r--toolkit/mozapps/update/UpdateService.sys.mjs28
-rw-r--r--toolkit/mozapps/update/UpdateTelemetry.sys.mjs2
-rw-r--r--toolkit/mozapps/update/common/updatererrors.h18
-rw-r--r--toolkit/mozapps/update/docs/BackgroundUpdates.rst6
-rw-r--r--toolkit/mozapps/update/tests/browser/browser_elevationDialog.js4
-rw-r--r--toolkit/mozapps/update/tests/browser/head.js2
-rw-r--r--toolkit/mozapps/update/tests/data/app_update.sjs4
-rw-r--r--toolkit/mozapps/update/tests/data/shared.js2
-rw-r--r--toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js14
-rw-r--r--toolkit/mozapps/update/tests/marionette/test_no_window_update_restart.py4
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/languagePackUpdates.js6
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/multiUpdate.js10
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/updateSyncManager.js4
-rw-r--r--toolkit/mozapps/update/tests/unit_background_update/test_backgroundupdate_glean.js6
-rw-r--r--toolkit/mozapps/update/updater/updater.cpp2
17 files changed, 57 insertions, 71 deletions
diff --git a/toolkit/mozapps/update/AppUpdater.sys.mjs b/toolkit/mozapps/update/AppUpdater.sys.mjs
index 6133fb613b..f837982b84 100644
--- a/toolkit/mozapps/update/AppUpdater.sys.mjs
+++ b/toolkit/mozapps/update/AppUpdater.sys.mjs
@@ -411,20 +411,6 @@ export class AppUpdater {
return Services.sysinfo.getProperty("isPackagedApp");
}
- // true when updating in background is enabled.
- get #updateStagingEnabled() {
- LOG(
- "AppUpdater:#updateStagingEnabled" +
- "canStageUpdates: " +
- this.aus.canStageUpdates
- );
- return (
- !this.aus.disabled &&
- !this.#updateDisabledByPackage &&
- this.aus.canStageUpdates
- );
- }
-
/**
* Downloads an update mar or connects to an in-progress download.
* Doesn't resolve until the update is ready to install, or a failure state
diff --git a/toolkit/mozapps/update/BackgroundUpdate.sys.mjs b/toolkit/mozapps/update/BackgroundUpdate.sys.mjs
index 28d0fc8538..3022c9ffde 100644
--- a/toolkit/mozapps/update/BackgroundUpdate.sys.mjs
+++ b/toolkit/mozapps/update/BackgroundUpdate.sys.mjs
@@ -570,7 +570,7 @@ export var BackgroundUpdate = {
};
try {
- // Interacting with `TaskScheduler.jsm` can throw, so we'll catch.
+ // Interacting with `TaskScheduler.sys.mjs` can throw, so we'll catch.
if (!enabled) {
lazy.log.info(
`${SLUG}: not scheduling background update: '${JSON.stringify(
diff --git a/toolkit/mozapps/update/UpdateService.sys.mjs b/toolkit/mozapps/update/UpdateService.sys.mjs
index 16ebf64ef3..34bf1b9e19 100644
--- a/toolkit/mozapps/update/UpdateService.sys.mjs
+++ b/toolkit/mozapps/update/UpdateService.sys.mjs
@@ -193,7 +193,7 @@ const WRITE_ERROR_DIR_ACCESS_DENIED = 68;
const WRITE_ERROR_DELETE_BACKUP = 69;
const WRITE_ERROR_EXTRACT = 70;
-// Error codes 80 through 99 are reserved for UpdateService.jsm and are not
+// Error codes 80 through 99 are reserved for UpdateService.sys.mjs and are not
// defined in common/updatererrors.h
const ERR_UPDATER_CRASHED = 89;
const ERR_OLDER_VERSION_OR_SAME_BUILD = 90;
@@ -440,7 +440,7 @@ let gOtherInstancePollPromise;
*
* @return true if at least one other instance is running, false if not
*/
-function isOtherInstanceRunning(callback) {
+function isOtherInstanceRunning() {
const checkEnabled = Services.prefs.getBoolPref(
PREF_APP_UPDATE_CHECK_ONLY_INSTANCE_ENABLED,
true
@@ -497,7 +497,7 @@ function waitForOtherInstances() {
let iterations = 0;
const maxIterations = Math.ceil(timeout / interval);
- gOtherInstancePollPromise = new Promise(function (resolve, reject) {
+ gOtherInstancePollPromise = new Promise(function (resolve) {
let poll = function () {
iterations++;
if (!isOtherInstanceRunning()) {
@@ -1907,7 +1907,7 @@ function pingStateAndStatusCodes(aUpdate, aStartup, aStatus) {
stateCode = 13;
break;
// Note: Do not use stateCode 14 here. It is defined in
- // UpdateTelemetry.jsm
+ // UpdateTelemetry.sys.mjs
default:
stateCode = 1;
}
@@ -3352,10 +3352,10 @@ UpdateService.prototype = {
/**
* Notified when a timer fires
- * @param timer
+ * @param _timer
* The timer that fired
*/
- notify: function AUS_notify(timer) {
+ notify: function AUS_notify(_timer) {
this._checkForBackgroundUpdates(true);
},
@@ -3399,7 +3399,7 @@ UpdateService.prototype = {
// See Bug 1599590.
// Note that we exit unconditionally here if we are only doing manual
// update checks, because manual update checking uses a completely
- // different code path (AppUpdater.jsm creates its own nsIUpdateChecker),
+ // different code path (AppUpdater.sys.mjs creates its own nsIUpdateChecker),
// bypassing this function completely.
AUSTLMY.pingCheckCode(this._pingSuffix, AUSTLMY.CHK_DISABLED_BY_POLICY);
return false;
@@ -4907,7 +4907,7 @@ UpdateManager.prototype = {
/**
* See nsIUpdateService.idl
*/
- doInstallCleanup: async function UM_doInstallCleanup(isUninstall) {
+ doInstallCleanup: async function UM_doInstallCleanup() {
LOG("UpdateManager:doInstallCleanup - cleaning up");
let completionPromises = [];
@@ -4949,7 +4949,7 @@ UpdateManager.prototype = {
/**
* See nsIUpdateService.idl
*/
- doUninstallCleanup: async function UM_doUninstallCleanup(isUninstall) {
+ doUninstallCleanup: async function UM_doUninstallCleanup() {
LOG("UpdateManager:doUninstallCleanup - cleaning up.");
let completionPromises = [];
@@ -5272,13 +5272,13 @@ export class CheckerService {
return;
}
- let onLoad = event => {
+ let onLoad = _event => {
request.removeEventListener("load", onLoad);
LOG("CheckerService:#updateCheck - request got 'load' event");
resolve(UPDATE_CHECK_LOAD_SUCCESS);
};
request.addEventListener("load", onLoad);
- let onError = event => {
+ let onError = _event => {
request.removeEventListener("error", onLoad);
LOG("CheckerService:#updateCheck - request got 'error' event");
resolve(UPDATE_CHECK_LOAD_ERROR);
@@ -5702,11 +5702,9 @@ Downloader.prototype = {
* set of update patches.
* @param update
* A nsIUpdate object to select a patch from
- * @param updateDir
- * A nsIFile representing the update directory
* @return A nsIUpdatePatch object to download
*/
- _selectPatch: function Downloader__selectPatch(update, updateDir) {
+ _selectPatch: function Downloader__selectPatch(update) {
// Given an update to download, we will always try to download the patch
// for a partial update over the patch for a full update.
@@ -5934,7 +5932,7 @@ Downloader.prototype = {
// This function may return null, which indicates that there are no patches
// to download.
- this._patch = this._selectPatch(update, updateDir);
+ this._patch = this._selectPatch(update);
if (!this._patch) {
LOG("Downloader:downloadUpdate - no patch to download");
AUSTLMY.pingDownloadCode(undefined, AUSTLMY.DWNLD_ERR_NO_UPDATE_PATCH);
diff --git a/toolkit/mozapps/update/UpdateTelemetry.sys.mjs b/toolkit/mozapps/update/UpdateTelemetry.sys.mjs
index 20fb0ab4a4..f3c350267c 100644
--- a/toolkit/mozapps/update/UpdateTelemetry.sys.mjs
+++ b/toolkit/mozapps/update/UpdateTelemetry.sys.mjs
@@ -316,7 +316,7 @@ export var AUSTLMY = {
* This value is also used to determine the key for the keyed scalar
* update.bitshresult (key is either "COMPLETE" or "PARTIAL")
* @param aError
- * The BitsError that occurred. See Bits.jsm for details on BitsError.
+ * The BitsError that occurred. See Bits.sys.mjs for details on BitsError.
*/
pingBitsError: function UT_pingBitsError(aIsComplete, aError) {
if (AppConstants.platform != "win") {
diff --git a/toolkit/mozapps/update/common/updatererrors.h b/toolkit/mozapps/update/common/updatererrors.h
index f2663d5b57..d3abf14ffe 100644
--- a/toolkit/mozapps/update/common/updatererrors.h
+++ b/toolkit/mozapps/update/common/updatererrors.h
@@ -10,7 +10,7 @@
#define OK 0
// Error codes that are no longer used should not be used again unless they
-// aren't used in client code (e.g. UpdateService.jsm, updates.js, etc.).
+// aren't used in client code (e.g. UpdateService.sys.mjs, updates.js, etc.).
#define MAR_ERROR_EMPTY_ACTION_LIST 1
#define LOADSOURCE_ERROR_WRONG_SIZE 2
@@ -26,8 +26,8 @@
// Error codes 10-14 are related to memory allocation failures.
// Note: If more memory allocation error codes are added, the implementation of
-// isMemoryAllocationErrorCode in UpdateService.jsm should be updated to account
-// for them.
+// isMemoryAllocationErrorCode in UpdateService.sys.mjs should be updated to
+// account for them.
#define READ_STRINGS_MEM_ERROR 10
#define ARCHIVE_READER_MEM_ERROR 11
#define BSPATCH_MEM_ERROR 12
@@ -49,8 +49,8 @@
// Error codes 24-33 and 49-58 are for the Windows maintenance service.
// Note: If more maintenance service error codes are added, the implementations
-// of IsServiceSpecificErrorCode in updater.cpp and UpdateService.jsm should be
-// updated to account for them.
+// of IsServiceSpecificErrorCode in updater.cpp and UpdateService.sys.mjs should
+// be updated to account for them.
#define SERVICE_UPDATER_COULD_NOT_BE_STARTED 24
#define SERVICE_NOT_ENOUGH_COMMAND_LINE_ARGS 25
#define SERVICE_UPDATER_SIGN_ERROR 26
@@ -79,8 +79,8 @@
// Error codes 24-33 and 49-58 are for the Windows maintenance service.
// Note: If more maintenance service error codes are added, the implementations
-// of IsServiceSpecificErrorCode in updater.cpp and UpdateService.jsm should be
-// updated to account for them.
+// of IsServiceSpecificErrorCode in updater.cpp and UpdateService.sys.mjs should
+// be updated to account for them.
#define SERVICE_COULD_NOT_COPY_UPDATER 49
#define SERVICE_STILL_APPLYING_TERMINATED 50
#define SERVICE_STILL_APPLYING_NO_EXIT_CODE 51
@@ -112,7 +112,7 @@
#define INVALID_CALLBACK_DIR_ERROR 78
#define UPDATE_STATUS_UNCHANGED 79
-// Error codes 80 through 99 are reserved for UpdateService.jsm
+// Error codes 80 through 99 are reserved for UpdateService.sys.mjs
// The following error codes are only used by updater.exe
// when a fallback key exists for tests.
@@ -125,6 +125,6 @@
#define SILENT_UPDATE_NEEDED_ELEVATION_ERROR 105
#define WRITE_ERROR_BACKGROUND_TASK_SHARING_VIOLATION 106
-// Error codes 110 and 111 are reserved for UpdateService.jsm
+// Error codes 110 and 111 are reserved for UpdateService.sys.mjs
#endif // UPDATEERRORS_H
diff --git a/toolkit/mozapps/update/docs/BackgroundUpdates.rst b/toolkit/mozapps/update/docs/BackgroundUpdates.rst
index 7f97f58c74..d8a154cb39 100644
--- a/toolkit/mozapps/update/docs/BackgroundUpdates.rst
+++ b/toolkit/mozapps/update/docs/BackgroundUpdates.rst
@@ -65,7 +65,7 @@ observe and control these settings.
But there are some other pieces of state which absolutely must come from a
profile, such as the telemetry client ID and logging level settings (see
-`BackgroundTasksUtils.jsm <https://searchfox.org/mozilla-central/source/toolkit/components/backgroundtasks/BackgroundTasksUtils.jsm>`__).
+`BackgroundTasksUtils.sys.mjs <https://searchfox.org/mozilla-central/source/toolkit/components/backgroundtasks/BackgroundTasksUtils.sys.mjs>`__).
This means that, in addition to our per-installation prefs, we also need
to be able to identify and load a profile. To do that, we leverage `the profile
@@ -137,7 +137,7 @@ API <https://docs.microsoft.com/en-us/windows/win32/taskschd/task-scheduler-star
on macOS this will use
`launchd <https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html>`__.
For platform-specific scheduling details, see the
-`TaskScheduler.jsm <https://searchfox.org/mozilla-central/source/toolkit/components/taskscheduler/TaskScheduler.jsm>`__
+`TaskScheduler.sys.mjs <https://searchfox.org/mozilla-central/source/toolkit/components/taskscheduler/TaskScheduler.sys.mjs>`__
module.
These background tasks are scheduled per OS user and run with that user’s
@@ -177,7 +177,7 @@ visible to users: see `bug 1775132
After setting up this profile and reading all the configuration we need
into it, the regular
-`UpdateService.jsm <https://searchfox.org/mozilla-central/source/toolkit/mozapps/update/UpdateService.jsm>`__
+`UpdateService.sys.mjs <https://searchfox.org/mozilla-central/source/toolkit/mozapps/update/UpdateService.sys.mjs>`__
check process is initiated. To the greatest extent possible, this process is
identical to what happens during any regular browsing session.
diff --git a/toolkit/mozapps/update/tests/browser/browser_elevationDialog.js b/toolkit/mozapps/update/tests/browser/browser_elevationDialog.js
index 6aa32a7fc9..639af1ffff 100644
--- a/toolkit/mozapps/update/tests/browser/browser_elevationDialog.js
+++ b/toolkit/mozapps/update/tests/browser/browser_elevationDialog.js
@@ -13,7 +13,7 @@ add_task(async function elevation_dialog() {
let { startup } = Services;
let appStartup = {
QueryInterface: ChromeUtils.generateQI(["nsIAppStartup"]),
- quit(mode) {
+ quit(_mode) {
if (elevationDialog) {
elevationDialog.close();
elevationDialog = null;
@@ -120,7 +120,7 @@ function waitForElevationDialog() {
var domwindow = aXULWindow.docShell.domWindow;
domwindow.addEventListener("load", elevationDialogOnLoad, true);
},
- onCloseWindow: aXULWindow => {},
+ onCloseWindow: _aXULWindow => {},
};
Services.wm.addListener(listener);
diff --git a/toolkit/mozapps/update/tests/browser/head.js b/toolkit/mozapps/update/tests/browser/head.js
index a18a72e581..c5acdad8e4 100644
--- a/toolkit/mozapps/update/tests/browser/head.js
+++ b/toolkit/mozapps/update/tests/browser/head.js
@@ -487,7 +487,7 @@ function waitForAboutDialog() {
var domwindow = aXULWindow.docShell.domWindow;
domwindow.addEventListener("load", aboutDialogOnLoad, true);
},
- onCloseWindow: aXULWindow => {},
+ onCloseWindow: _aXULWindow => {},
};
Services.wm.addListener(listener);
diff --git a/toolkit/mozapps/update/tests/data/app_update.sjs b/toolkit/mozapps/update/tests/data/app_update.sjs
index 2081118547..1d5d23bfb5 100644
--- a/toolkit/mozapps/update/tests/data/app_update.sjs
+++ b/toolkit/mozapps/update/tests/data/app_update.sjs
@@ -79,7 +79,7 @@ function handleRequest(aRequest, aResponse) {
let retries = 0;
gSlowDownloadTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
gSlowDownloadTimer.initWithCallback(
- function (aTimer) {
+ function (_aTimer) {
let continueFile = getTestDataFile(CONTINUE_DOWNLOAD);
retries++;
if (continueFile.exists() || retries == MAX_SLOW_RESPONSE_RETRIES) {
@@ -197,7 +197,7 @@ function respond(aResponse, aParams, aResponseString) {
aResponse.processAsync();
gSlowCheckTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
gSlowCheckTimer.initWithCallback(
- function (aTimer) {
+ function (_aTimer) {
retries++;
let continueFile = getTestDataFile(CONTINUE_CHECK);
if (continueFile.exists() || retries == MAX_SLOW_RESPONSE_RETRIES) {
diff --git a/toolkit/mozapps/update/tests/data/shared.js b/toolkit/mozapps/update/tests/data/shared.js
index fc3d358586..60de6feeb8 100644
--- a/toolkit/mozapps/update/tests/data/shared.js
+++ b/toolkit/mozapps/update/tests/data/shared.js
@@ -922,7 +922,7 @@ async function continueFileHandler(leafName) {
"Waiting for file to be deleted, path: " + continueFile.path,
interval,
retries
- ).catch(e => {
+ ).catch(_e => {
logTestInfo(
"Continue file was not removed after checking " +
retries +
diff --git a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
index e88a4418cb..4b12edf6f0 100644
--- a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
+++ b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
@@ -3766,7 +3766,7 @@ function checkFilesAfterUpdateSuccess(
"xattr value changed"
);
},
- reason => {
+ _reason => {
Assert.fail(MAC_APP_XATTR_KEY + " xattr is missing!");
}
);
@@ -4233,9 +4233,9 @@ async function waitForUpdateDownload(aUpdates, aExpectedStatus) {
}
return new Promise(resolve =>
gAUS.addDownloadListener({
- onStartRequest: aRequest => {},
- onProgress: (aRequest, aContext, aProgress, aMaxProgress) => {},
- onStatus: (aRequest, aStatus, aStatusText) => {},
+ onStartRequest: _aRequest => {},
+ onProgress: (_aRequest, _aContext, _aProgress, _aMaxProgress) => {},
+ onStatus: (_aRequest, _aStatus, _aStatusText) => {},
onStopRequest(request, status) {
gAUS.removeDownloadListener(this);
Assert.equal(
@@ -4552,7 +4552,7 @@ function adjustGeneralPaths() {
* The timer callback to kill the process if it takes too long.
*/
const gAppTimerCallback = {
- notify: function TC_notify(aTimer) {
+ notify: function TC_notify(_aTimer) {
gAppTimer = null;
if (gProcess.isRunning) {
logTestInfo("attempting to kill process");
@@ -4662,7 +4662,7 @@ function IncrementalDownload() {
IncrementalDownload.prototype = {
/* nsIIncrementalDownload */
- init(uri, file, chunkSize, intervalInSeconds) {
+ init(uri, file, _chunkSize, _intervalInSeconds) {
this._destination = file;
this._URI = uri;
this._finalURI = uri;
@@ -4729,7 +4729,7 @@ IncrementalDownload.prototype = {
},
/* nsIRequest */
- cancel(aStatus) {
+ cancel(_aStatus) {
throw Components.Exception("", Cr.NS_ERROR_NOT_IMPLEMENTED);
},
suspend() {
diff --git a/toolkit/mozapps/update/tests/marionette/test_no_window_update_restart.py b/toolkit/mozapps/update/tests/marionette/test_no_window_update_restart.py
index a8495064ef..9452a4fcd7 100644
--- a/toolkit/mozapps/update/tests/marionette/test_no_window_update_restart.py
+++ b/toolkit/mozapps/update/tests/marionette/test_no_window_update_restart.py
@@ -162,7 +162,9 @@ class TestNoWindowUpdateRestart(MarionetteTestCase):
let UM = Cc["@mozilla.org/updates/update-manager;1"].getService(Ci.nsIUpdateManager);
UM.QueryInterface(Ci.nsIObserver).observe(null, "um-reload-update-data", "skip-files");
- let { UpdateListener } = ChromeUtils.import("resource://gre/modules/UpdateListener.jsm");
+ let { UpdateListener } = ChromeUtils.importESModule(
+ "resource://gre/modules/UpdateListener.sys.mjs"
+ );
UpdateListener.reset();
let { AppMenuNotifications } = ChromeUtils.importESModule(
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/languagePackUpdates.js b/toolkit/mozapps/update/tests/unit_aus_update/languagePackUpdates.js
index 0ae35ef77a..9e23fab5e0 100644
--- a/toolkit/mozapps/update/tests/unit_aus_update/languagePackUpdates.js
+++ b/toolkit/mozapps/update/tests/unit_aus_update/languagePackUpdates.js
@@ -243,9 +243,9 @@ add_task(async function testRedownload() {
let downloadCount = 0;
let listener = {
- onStartRequest: aRequest => {},
- onProgress: (aRequest, aContext, aProgress, aMaxProgress) => {},
- onStatus: (aRequest, aStatus, aStatusText) => {},
+ onStartRequest: _aRequest => {},
+ onProgress: (_aRequest, _aContext, _aProgress, _aMaxProgress) => {},
+ onStatus: (_aRequest, _aStatus, _aStatusText) => {},
onStopRequest: (request, status) => {
Assert.equal(
status,
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/multiUpdate.js b/toolkit/mozapps/update/tests/unit_aus_update/multiUpdate.js
index 3767a44feb..411b303331 100644
--- a/toolkit/mozapps/update/tests/unit_aus_update/multiUpdate.js
+++ b/toolkit/mozapps/update/tests/unit_aus_update/multiUpdate.js
@@ -73,14 +73,14 @@ async function downloadUpdate(appUpdateAuto, onDownloadStartCallback) {
}
let waitToStartPromise = new Promise(resolve => {
let listener = {
- onStartRequest: aRequest => {
+ onStartRequest: _aRequest => {
gAUS.removeDownloadListener(listener);
onDownloadStartCallback();
resolve();
},
- onProgress: (aRequest, aContext, aProgress, aMaxProgress) => {},
- onStatus: (aRequest, aStatus, aStatusText) => {},
- onStopRequest(request, status) {},
+ onProgress: (_aRequest, _aContext, _aProgress, _aMaxProgress) => {},
+ onStatus: (_aRequest, _aStatus, _aStatusText) => {},
+ onStopRequest(_request, _status) {},
QueryInterface: ChromeUtils.generateQI([
"nsIRequestObserver",
"nsIProgressEventSink",
@@ -149,7 +149,7 @@ async function testUpdateDoesNotDownload() {
);
let updateAvailableObserved = false;
- let observer = (subject, topic, status) => {
+ let observer = (_subject, _topic, _status) => {
updateAvailableObserved = true;
};
Services.obs.addObserver(observer, "update-available");
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/updateSyncManager.js b/toolkit/mozapps/update/tests/unit_aus_update/updateSyncManager.js
index 9123f9e1e3..c705d536a4 100644
--- a/toolkit/mozapps/update/tests/unit_aus_update/updateSyncManager.js
+++ b/toolkit/mozapps/update/tests/unit_aus_update/updateSyncManager.js
@@ -79,7 +79,7 @@ add_task(async function () {
await TestUtils.waitForCondition(
() => syncManager.isOtherInstanceRunning(),
"waiting for child process to take the lock"
- ).catch(e => {
+ ).catch(_e => {
// Rather than throwing out of waitForCondition(), catch and log the failure
// manually so that we get output that's a bit more readable.
Assert.ok(
@@ -93,7 +93,7 @@ add_task(async function () {
await TestUtils.waitForCondition(
() => !syncManager.isOtherInstanceRunning(),
"waiting for child process to release the lock"
- ).catch(e => {
+ ).catch(_e => {
Assert.ok(
!syncManager.isOtherInstanceRunning(),
"child process has released the lock"
diff --git a/toolkit/mozapps/update/tests/unit_background_update/test_backgroundupdate_glean.js b/toolkit/mozapps/update/tests/unit_background_update/test_backgroundupdate_glean.js
index 0d9c06b2d0..0ca74e4764 100644
--- a/toolkit/mozapps/update/tests/unit_background_update/test_backgroundupdate_glean.js
+++ b/toolkit/mozapps/update/tests/unit_background_update/test_backgroundupdate_glean.js
@@ -140,7 +140,7 @@ async function do_readTargeting(content, beforeNextSubmitCallback) {
// Missing targeting is anticipated.
add_task(async function test_targeting_missing() {
- await do_readTargeting(null, reason => {
+ await do_readTargeting(null, _reason => {
Assert.equal(false, Glean.backgroundUpdate.targetingExists.testGetValue());
Assert.equal(
@@ -152,7 +152,7 @@ add_task(async function test_targeting_missing() {
// Malformed JSON yields an exception.
add_task(async function test_targeting_exception() {
- await do_readTargeting("{", reason => {
+ await do_readTargeting("{", _reason => {
Assert.equal(false, Glean.backgroundUpdate.targetingExists.testGetValue());
Assert.equal(
@@ -193,7 +193,7 @@ add_task(async function test_targeting_exists() {
targets: [manager.createTargetingContext(), target],
});
- await do_readTargeting(JSON.stringify(targetSnapshot), reason => {
+ await do_readTargeting(JSON.stringify(targetSnapshot), _reason => {
Assert.equal(true, Glean.backgroundUpdate.targetingExists.testGetValue());
Assert.equal(
diff --git a/toolkit/mozapps/update/updater/updater.cpp b/toolkit/mozapps/update/updater/updater.cpp
index 947e84aac3..6b01450b31 100644
--- a/toolkit/mozapps/update/updater/updater.cpp
+++ b/toolkit/mozapps/update/updater/updater.cpp
@@ -3734,7 +3734,7 @@ int NS_main(int argc, NS_tchar** argv) {
}
// Set an error so we don't get into an update loop when the callback
// runs. This will be reset to pending by handleUpdateFailure in
- // UpdateService.jsm.
+ // UpdateService.sys.mjs.
WriteStatusFile(SILENT_UPDATE_NEEDED_ELEVATION_ERROR);
LOG(("Skipping update to avoid UAC prompt from background task."));
output_finish();