summaryrefslogtreecommitdiffstats
path: root/dom/push/PushService.sys.mjs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /dom/push/PushService.sys.mjs
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz
firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/push/PushService.sys.mjs')
-rw-r--r--dom/push/PushService.sys.mjs22
1 files changed, 10 insertions, 12 deletions
diff --git a/dom/push/PushService.sys.mjs b/dom/push/PushService.sys.mjs
index 7314e3df54..1add65992f 100644
--- a/dom/push/PushService.sys.mjs
+++ b/dom/push/PushService.sys.mjs
@@ -623,7 +623,7 @@ export var PushService = {
this._db.close();
this._db = null;
},
- err => {
+ () => {
this._db.close();
this._db = null;
}
@@ -1162,17 +1162,15 @@ export var PushService = {
let keyPromise;
if (aPageRecord.appServerKey && aPageRecord.appServerKey.length) {
let keyView = new Uint8Array(aPageRecord.appServerKey);
- keyPromise = lazy.PushCrypto.validateAppServerKey(keyView).catch(
- error => {
- // Normalize Web Crypto exceptions. `nsIPushService` will forward the
- // error result to the DOM API implementation in `PushManager.cpp` or
- // `Push.js`, which will convert it to the correct `DOMException`.
- throw errorWithResult(
- "Invalid app server key",
- Cr.NS_ERROR_DOM_PUSH_INVALID_KEY_ERR
- );
- }
- );
+ keyPromise = lazy.PushCrypto.validateAppServerKey(keyView).catch(() => {
+ // Normalize Web Crypto exceptions. `nsIPushService` will forward the
+ // error result to the DOM API implementation in `PushManager.cpp` or
+ // `Push.js`, which will convert it to the correct `DOMException`.
+ throw errorWithResult(
+ "Invalid app server key",
+ Cr.NS_ERROR_DOM_PUSH_INVALID_KEY_ERR
+ );
+ });
} else {
keyPromise = Promise.resolve(null);
}