diff options
Diffstat (limited to 'application/basilisk/base/content')
5 files changed, 9 insertions, 40 deletions
diff --git a/application/basilisk/base/content/aboutaccounts/aboutaccounts.js b/application/basilisk/base/content/aboutaccounts/aboutaccounts.js index a05c1ea75..f03029b1d 100644 --- a/application/basilisk/base/content/aboutaccounts/aboutaccounts.js +++ b/application/basilisk/base/content/aboutaccounts/aboutaccounts.js @@ -450,14 +450,9 @@ function migrateToDevEdition(urlParams) { try { defaultProfilePath = window.getDefaultProfilePath(); } catch (e) {} // no default profile. - let migrateSyncCreds = false; - if (defaultProfilePath) { - try { - migrateSyncCreds = Services.prefs.getBoolPref("identity.fxaccounts.migrateToDevEdition"); - } catch (e) {} - } + let migrateSyncCreds = Services.prefs.getBoolPref("identity.fxaccounts.migrateToDevEdition", false); - if (!migrateSyncCreds) { + if (!defaultProfilePath || !migrateSyncCreds) { return Promise.resolve(false); } diff --git a/application/basilisk/base/content/browser-syncui.js b/application/basilisk/base/content/browser-syncui.js index 3a57140f2..7a80be87e 100644 --- a/application/basilisk/base/content/browser-syncui.js +++ b/application/basilisk/base/content/browser-syncui.js @@ -106,10 +106,7 @@ var gSyncUI = { }); } // We are using legacy sync - check that. - let firstSync = ""; - try { - firstSync = Services.prefs.getCharPref("services.sync.firstSync"); - } catch (e) { } + let firstSync = Services.prefs.getCharPref("services.sync.firstSync", ""); return Promise.resolve(Weave.Status.checkSetup() == Weave.CLIENT_NOT_CONFIGURED || firstSync == "notReady"); @@ -349,10 +346,7 @@ var gSyncUI = { */ maybeMoveSyncedTabsButton() { const prefName = "browser.migrated-sync-button"; - let migrated = false; - try { - migrated = Services.prefs.getBoolPref(prefName); - } catch (_) {} + let migrated = Services.prefs.getBoolPref(prefName, false); if (migrated) { return; } diff --git a/application/basilisk/base/content/browser.js b/application/basilisk/base/content/browser.js index ddbe11a9d..7e8f7d821 100644 --- a/application/basilisk/base/content/browser.js +++ b/application/basilisk/base/content/browser.js @@ -2579,15 +2579,9 @@ var gMenuButtonUpdateBadge = { cancelObserverRegistered: false, init: function () { - try { - this.enabled = Services.prefs.getBoolPref("app.update.badge"); - } catch (e) {} + this.enabled = Services.prefs.getBoolPref("app.update.badge", false); if (this.enabled) { - try { - this.badgeWaitTime = Services.prefs.getIntPref("app.update.badgeWaitTime"); - } catch (e) { - this.badgeWaitTime = 345600; // 4 days - } + this.badgeWaitTime = Services.prefs.getIntPref("app.update.badgeWaitTime", 345600); // 4 days Services.obs.addObserver(this, "update-staged", false); Services.obs.addObserver(this, "update-downloaded", false); } diff --git a/application/basilisk/base/content/sync/aboutSyncTabs.js b/application/basilisk/base/content/sync/aboutSyncTabs.js index f4bb607ea..69ec71e55 100644 --- a/application/basilisk/base/content/sync/aboutSyncTabs.js +++ b/application/basilisk/base/content/sync/aboutSyncTabs.js @@ -306,13 +306,7 @@ var RemoteTabViewer = { _refetchTabs: function (force) { if (!force) { // Don't bother refetching tabs if we already did so recently - let lastFetch = 0; - try { - lastFetch = Services.prefs.getIntPref("services.sync.lastTabFetch"); - } - catch (e) { - /* Just use the default value of 0 */ - } + lastFetch = Services.prefs.getIntPref("services.sync.lastTabFetch", 0); let now = Math.floor(Date.now() / 1000); if (now - lastFetch < 30) { diff --git a/application/basilisk/base/content/tabbrowser.xml b/application/basilisk/base/content/tabbrowser.xml index c2f02512d..0e819a3ed 100644 --- a/application/basilisk/base/content/tabbrowser.xml +++ b/application/basilisk/base/content/tabbrowser.xml @@ -4135,11 +4135,7 @@ return true; if (this._logInit) return this._shouldLog; - let result = false; - try { - result = Services.prefs.getBoolPref("browser.tabs.remote.logSwitchTiming"); - } catch (ex) { - } + let result = Services.prefs.getBoolPref("browser.tabs.remote.logSwitchTiming", false); this._shouldLog = result; this._logInit = true; return this._shouldLog; @@ -5208,11 +5204,7 @@ window.addEventListener("resize", this, false); window.addEventListener("load", this, false); - try { - this._tabAnimationLoggingEnabled = Services.prefs.getBoolPref("browser.tabs.animationLogging.enabled"); - } catch (ex) { - this._tabAnimationLoggingEnabled = false; - } + this._tabAnimationLoggingEnabled = Services.prefs.getBoolPref("browser.tabs.animationLogging.enabled", false); this._browserNewtabpageEnabled = Services.prefs.getBoolPref("browser.newtabpage.enabled"); ]]> </constructor> |