diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /dom/push/PushService.sys.mjs | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-adbda400be353e676059e335c3c0aaf99e719475.tar.xz firefox-adbda400be353e676059e335c3c0aaf99e719475.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.mjs | 22 |
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); } |