diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-05-02 06:57:57 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-05-02 06:57:57 +0200 |
commit | 3442ae7718679a4da8664bdbb561f746e0357203 (patch) | |
tree | 5ed661a5998ac91f309bb27cb5ae52dfb4178cca /services/fxaccounts | |
parent | 61de1c80cdc6c04e71fde07cc5028af503438134 (diff) | |
download | UXP-3442ae7718679a4da8664bdbb561f746e0357203.tar UXP-3442ae7718679a4da8664bdbb561f746e0357203.tar.gz UXP-3442ae7718679a4da8664bdbb561f746e0357203.tar.lz UXP-3442ae7718679a4da8664bdbb561f746e0357203.tar.xz UXP-3442ae7718679a4da8664bdbb561f746e0357203.zip |
Fix unsafe "instanceof" negations
https://github.com/MoonchildProductions/Pale-Moon/pull/1173
Diffstat (limited to 'services/fxaccounts')
-rw-r--r-- | services/fxaccounts/FxAccountsProfileClient.jsm | 4 | ||||
-rw-r--r-- | services/fxaccounts/FxAccountsStorage.jsm | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/services/fxaccounts/FxAccountsProfileClient.jsm b/services/fxaccounts/FxAccountsProfileClient.jsm index 37115a3fa..1e5edc634 100644 --- a/services/fxaccounts/FxAccountsProfileClient.jsm +++ b/services/fxaccounts/FxAccountsProfileClient.jsm @@ -89,7 +89,7 @@ this.FxAccountsProfileClient.prototype = { try { return (yield this._rawRequest(path, method, token)); } catch (ex) { - if (!ex instanceof FxAccountsProfileClientError || ex.code != 401) { + if (!(ex instanceof FxAccountsProfileClientError) || ex.code != 401) { throw ex; } // If this object was instantiated with a token then we don't refresh it. @@ -105,7 +105,7 @@ this.FxAccountsProfileClient.prototype = { try { return (yield this._rawRequest(path, method, token)); } catch (ex) { - if (!ex instanceof FxAccountsProfileClientError || ex.code != 401) { + if (!(ex instanceof FxAccountsProfileClientError) || ex.code != 401) { throw ex; } log.info("Retry fetching the profile still returned a 401 - revoking our token and failing"); diff --git a/services/fxaccounts/FxAccountsStorage.jsm b/services/fxaccounts/FxAccountsStorage.jsm index 021763b92..43e2d21a0 100644 --- a/services/fxaccounts/FxAccountsStorage.jsm +++ b/services/fxaccounts/FxAccountsStorage.jsm @@ -403,7 +403,7 @@ this.FxAccountsStorageManager.prototype = { try { yield this.secureStorage.set(this.cachedPlain.uid, toWriteSecure); } catch (ex) { - if (!ex instanceof this.secureStorage.STORAGE_LOCKED) { + if (!(ex instanceof this.secureStorage.STORAGE_LOCKED)) { throw ex; } // This shouldn't be possible as once it is unlocked it can't be |