This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch upstream/28.5.0 in repository pale-moon. commit 2d3b7717ae8ddfa5e6561cff5d6daa7f80a939e5 Author: Ascrod <32915892+Ascrod@users.noreply.github.com> Date: Mon Apr 8 21:06:29 2019 -0400 Issue #991 Part 6: Services --- services/common/tokenserverclient.js | 5 +---- services/crypto/modules/WeaveCrypto.js | 6 +----- services/fxaccounts/FxAccounts.jsm | 14 ++------------ services/sync/modules/status.js | 7 +------ 4 files changed, 5 insertions(+), 27 deletions(-) diff --git a/services/common/tokenserverclient.js b/services/common/tokenserverclient.js index b220ab5..ca40f7d 100644 --- a/services/common/tokenserverclient.js +++ b/services/common/tokenserverclient.js @@ -149,10 +149,7 @@ TokenServerClientServerError.prototype._toStringFields = function() { */ this.TokenServerClient = function TokenServerClient() { this._log = Log.repository.getLogger("Common.TokenServerClient"); - let level = "Debug"; - try { - level = Services.prefs.getCharPref(PREF_LOG_LEVEL); - } catch (ex) {} + let level = Services.prefs.getCharPref(PREF_LOG_LEVEL, "Debug"); this._log.level = Log.Level[level]; } TokenServerClient.prototype = { diff --git a/services/crypto/modules/WeaveCrypto.js b/services/crypto/modules/WeaveCrypto.js index c040c4f..d0d5bdb 100644 --- a/services/crypto/modules/WeaveCrypto.js +++ b/services/crypto/modules/WeaveCrypto.js @@ -51,11 +51,7 @@ WeaveCrypto.prototype = { this.prefBranch = Services.prefs.getBranch("services.sync.log."); this.prefBranch.addObserver("cryptoDebug", this.observer, false); this.observer._self = this; - try { - this.debug = this.prefBranch.getBoolPref("cryptoDebug"); - } catch (x) { - this.debug = false; - } + this.debug = this.prefBranch.getBoolPref("cryptoDebug", false); XPCOMUtils.defineLazyGetter(this, 'encoder', () => new TextEncoder(UTF_LABEL)); XPCOMUtils.defineLazyGetter(this, 'decoder', () => new TextDecoder(UTF_LABEL, { fatal: true })); }, diff --git a/services/fxaccounts/FxAccounts.jsm b/services/fxaccounts/FxAccounts.jsm index 5bed881..0e072ee 100644 --- a/services/fxaccounts/FxAccounts.jsm +++ b/services/fxaccounts/FxAccounts.jsm @@ -1000,12 +1000,7 @@ FxAccountsInternal.prototype = { // The purpose of this pref is to expedite any auth errors as the result of a // expired or revoked FxA session token, e.g., from resetting or changing the FxA // password. - let ignoreCachedAuthCredentials = false; - try { - ignoreCachedAuthCredentials = Services.prefs.getBoolPref("services.sync.debug.ignoreCachedAuthCredentials"); - } catch(e) { - // Pref doesn't exist - } + let ignoreCachedAuthCredentials = Services.prefs.getBoolPref("services.sync.debug.ignoreCachedAuthCredentials", false); let mustBeValidUntil = this.now() + ASSERTION_USE_PERIOD; let accountData = yield currentState.getUserAccountData(["cert", "keyPair", "sessionToken"]); @@ -1239,12 +1234,7 @@ FxAccountsInternal.prototype = { }, requiresHttps: function() { - let allowHttp = false; - try { - allowHttp = Services.prefs.getBoolPref("identity.fxaccounts.allowHttp"); - } catch(e) { - // Pref doesn't exist - } + let allowHttp = Services.prefs.getBoolPref("identity.fxaccounts.allowHttp", false); return allowHttp !== true; }, diff --git a/services/sync/modules/status.js b/services/sync/modules/status.js index a5b8305..1233cbe 100644 --- a/services/sync/modules/status.js +++ b/services/sync/modules/status.js @@ -125,12 +125,7 @@ this.Status = { resetSync: function resetSync() { // Logger setup. let logPref = PREFS_BRANCH + "log.logger.status"; - let logLevel = "Trace"; - try { - logLevel = Services.prefs.getCharPref(logPref); - } catch (ex) { - // Use default. - } + let logLevel = Services.prefs.getCharPref(logPref, "Trace"); this._log.level = Log.Level[logLevel]; this._log.info("Resetting Status."); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pale-moon.git