summaryrefslogtreecommitdiffstats
path: root/dom/push/PushService.sys.mjs
diff options
context:
space:
mode:
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);
}