From d8bbc7858622b6d9c278469aab701ca0b609cddf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:35:49 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- toolkit/components/backgroundtasks/BackgroundTask_message.sys.mjs | 5 +---- toolkit/components/backgroundtasks/BackgroundTasksManager.sys.mjs | 2 +- toolkit/components/backgroundtasks/BackgroundTasksUtils.sys.mjs | 2 +- .../components/backgroundtasks/tests/BackgroundTask_crash.sys.mjs | 2 +- .../backgroundtasks/tests/BackgroundTask_jsdebugger.sys.mjs | 2 +- .../tests/BackgroundTask_shouldprocessupdates.sys.mjs | 2 +- .../backgroundtasks/tests/BackgroundTask_targeting.sys.mjs | 2 +- .../tests/xpcshell/test_backgroundtask_experiments.js | 4 ++-- 8 files changed, 9 insertions(+), 12 deletions(-) (limited to 'toolkit/components/backgroundtasks') diff --git a/toolkit/components/backgroundtasks/BackgroundTask_message.sys.mjs b/toolkit/components/backgroundtasks/BackgroundTask_message.sys.mjs index 6fc1d789b9..aafe4a6dcf 100644 --- a/toolkit/components/backgroundtasks/BackgroundTask_message.sys.mjs +++ b/toolkit/components/backgroundtasks/BackgroundTask_message.sys.mjs @@ -82,10 +82,7 @@ outputInfo = (sentinel, info) => { dump(`${sentinel}${JSON.stringify(info)}${sentinel}\n`); }; -function monkeyPatchRemoteSettingsClient({ - last_modified = new Date().getTime(), - data = [], -}) { +function monkeyPatchRemoteSettingsClient({ data = [] }) { lazy.RemoteSettingsClient.prototype.get = async (options = {}) => { outputInfo({ "RemoteSettingsClient.get": { options, response: { data } } }); return data; diff --git a/toolkit/components/backgroundtasks/BackgroundTasksManager.sys.mjs b/toolkit/components/backgroundtasks/BackgroundTasksManager.sys.mjs index dcf17625f7..97b2f4d93d 100644 --- a/toolkit/components/backgroundtasks/BackgroundTasksManager.sys.mjs +++ b/toolkit/components/backgroundtasks/BackgroundTasksManager.sys.mjs @@ -172,7 +172,7 @@ export class BackgroundTasksManager { const waitFlag = commandLine.findFlag("wait-for-jsdebugger", CASE_INSENSITIVE) != -1; if (waitFlag) { - function onDevtoolsThreadReady(subject, topic, data) { + function onDevtoolsThreadReady(subject, topic) { lazy.log.info( `${Services.appinfo.processID}: Setting breakpoints for background task named '${name}'` + ` (with ${commandLine.length} arguments)` diff --git a/toolkit/components/backgroundtasks/BackgroundTasksUtils.sys.mjs b/toolkit/components/backgroundtasks/BackgroundTasksUtils.sys.mjs index 9521af5a56..2ee2f085ae 100644 --- a/toolkit/components/backgroundtasks/BackgroundTasksUtils.sys.mjs +++ b/toolkit/components/backgroundtasks/BackgroundTasksUtils.sys.mjs @@ -193,7 +193,7 @@ export var BackgroundTasksUtils = { lazy.log.info(`readPreferences: profile is locked`); let prefs = {}; - let addPref = (kind, name, value, sticky, locked) => { + let addPref = (kind, name, value) => { if (predicate && !predicate(name)) { return; } diff --git a/toolkit/components/backgroundtasks/tests/BackgroundTask_crash.sys.mjs b/toolkit/components/backgroundtasks/tests/BackgroundTask_crash.sys.mjs index 10764bc1f7..7afc94ed47 100644 --- a/toolkit/components/backgroundtasks/tests/BackgroundTask_crash.sys.mjs +++ b/toolkit/components/backgroundtasks/tests/BackgroundTask_crash.sys.mjs @@ -4,7 +4,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ export async function runBackgroundTask(commandLine) { - // This task depends on `CrashTestUtils.jsm` and requires the + // This task depends on `CrashTestUtils.sys.mjs` and requires the // sibling `testcrasher` library to be in the current working // directory. Fail right away if we can't find the module or the // native library. diff --git a/toolkit/components/backgroundtasks/tests/BackgroundTask_jsdebugger.sys.mjs b/toolkit/components/backgroundtasks/tests/BackgroundTask_jsdebugger.sys.mjs index 45cf00a449..9479a404ff 100644 --- a/toolkit/components/backgroundtasks/tests/BackgroundTask_jsdebugger.sys.mjs +++ b/toolkit/components/backgroundtasks/tests/BackgroundTask_jsdebugger.sys.mjs @@ -11,7 +11,7 @@ * code to exit code 0. */ -export function runBackgroundTask(commandLine) { +export function runBackgroundTask() { // In the future, will be modifed by the JS debugger (to 0, success). var exposedExitCode = 0; diff --git a/toolkit/components/backgroundtasks/tests/BackgroundTask_shouldprocessupdates.sys.mjs b/toolkit/components/backgroundtasks/tests/BackgroundTask_shouldprocessupdates.sys.mjs index 4030f42e5d..0b47970dee 100644 --- a/toolkit/components/backgroundtasks/tests/BackgroundTask_shouldprocessupdates.sys.mjs +++ b/toolkit/components/backgroundtasks/tests/BackgroundTask_shouldprocessupdates.sys.mjs @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -export async function runBackgroundTask(commandLine) { +export async function runBackgroundTask() { const get = Services.env.get("MOZ_TEST_PROCESS_UPDATES"); let exitCode = 81; if (get == "ShouldNotProcessUpdates(): OtherInstanceRunning") { diff --git a/toolkit/components/backgroundtasks/tests/BackgroundTask_targeting.sys.mjs b/toolkit/components/backgroundtasks/tests/BackgroundTask_targeting.sys.mjs index fd47d18470..b7a9d08896 100644 --- a/toolkit/components/backgroundtasks/tests/BackgroundTask_targeting.sys.mjs +++ b/toolkit/components/backgroundtasks/tests/BackgroundTask_targeting.sys.mjs @@ -20,7 +20,7 @@ const EXCLUDED_NAMES = [ * Return 0 (success) if all targeting getters succeed, 11 (failure) * otherwise. */ -export async function runBackgroundTask(commandLine) { +export async function runBackgroundTask() { let exitCode = EXIT_CODE.SUCCESS; // Can't use `ASRouterTargeting.getEnvironmentSnapshot`, since that diff --git a/toolkit/components/backgroundtasks/tests/xpcshell/test_backgroundtask_experiments.js b/toolkit/components/backgroundtasks/tests/xpcshell/test_backgroundtask_experiments.js index 9d834bfd5b..cb4f3bb957 100644 --- a/toolkit/components/backgroundtasks/tests/xpcshell/test_backgroundtask_experiments.js +++ b/toolkit/components/backgroundtasks/tests/xpcshell/test_backgroundtask_experiments.js @@ -136,8 +136,8 @@ async function doMessage({ extraArgs = [], extraEnv = {} } = {}) { // i.e., persisted. Verify that messages are shown until we hit the lifetime // frequency caps. // -// It's awkward to inspect the `ASRouter.jsm` internal state directly in this -// manner, but this is the pattern for testing such things at the time of +// It's awkward to inspect the `ASRouter.sys.mjs` internal state directly in +// this manner, but this is the pattern for testing such things at the time of // writing. add_task(async function test_backgroundtask_caps() { let experimentFile = do_get_file("experiment.json"); -- cgit v1.2.3