From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- dom/push/test/xpcshell/head.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'dom/push/test/xpcshell/head.js') diff --git a/dom/push/test/xpcshell/head.js b/dom/push/test/xpcshell/head.js index da50ee3c5c..926d523201 100644 --- a/dom/push/test/xpcshell/head.js +++ b/dom/push/test/xpcshell/head.js @@ -46,7 +46,7 @@ var isParent = Services.appinfo.processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT; // Stop and clean up after the PushService. -Services.obs.addObserver(function observe(subject, topic, data) { +Services.obs.addObserver(function observe(subject, topic) { Services.obs.removeObserver(observe, topic); PushService.uninit(); // Occasionally, `profile-change-teardown` and `xpcom-shutdown` will fire @@ -107,7 +107,7 @@ function waterfall(...callbacks) { * @returns {Promise} A promise that fulfills when the notification is fired. */ function promiseObserverNotification(topic, matchFunc) { - return new Promise((resolve, reject) => { + return new Promise(resolve => { Services.obs.addObserver(function observe(subject, aTopic, data) { let matches = typeof matchFunc != "function" || matchFunc(subject, data); if (!matches) { @@ -305,7 +305,7 @@ MockWebSocket.prototype = { this._handleMessage(msg); }, - close(code, reason) { + close() { waterfall(() => this._listener.onStop(this._context, Cr.NS_OK)); }, @@ -413,7 +413,7 @@ var setUpServiceInParent = async function (service, db) { }), makeWebSocket(uri) { return new MockWebSocket(uri, { - onHello(request) { + onHello() { this.serverSendMsg( JSON.stringify({ messageType: "hello", -- cgit v1.2.3