From 7591326915a100b54ca17ad6fedb391645bac6b5 Mon Sep 17 00:00:00 2001 From: Ascrod <32915892+Ascrod@users.noreply.github.com> Date: Mon, 8 Apr 2019 19:58:00 -0400 Subject: Issue #991 Part 2: Basilisk --- application/basilisk/components/distribution.js | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'application/basilisk/components/distribution.js') diff --git a/application/basilisk/components/distribution.js b/application/basilisk/components/distribution.js index 589129a5a..c30e4dcfe 100644 --- a/application/basilisk/components/distribution.js +++ b/application/basilisk/components/distribution.js @@ -22,10 +22,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", this.DistributionCustomizer = function DistributionCustomizer() { // For parallel xpcshell testing purposes allow loading the distribution.ini // file from the profile folder through an hidden pref. - let loadFromProfile = false; - try { - loadFromProfile = Services.prefs.getBoolPref("distribution.testing.loadFromProfile"); - } catch (ex) {} + loadFromProfile = Services.prefs.getBoolPref("distribution.testing.loadFromProfile", false); let dirSvc = Cc["@mozilla.org/file/directory_service;1"]. getService(Ci.nsIProperties); try { @@ -60,13 +57,7 @@ DistributionCustomizer.prototype = { }, get _locale() { - let locale; - try { - locale = this._prefs.getCharPref("general.useragent.locale"); - } - catch (e) { - locale = "en-US"; - } + let locale = this._prefs.getCharPref("general.useragent.locale", "en-US"); this.__defineGetter__("_locale", () => locale); return this._locale; }, @@ -291,11 +282,7 @@ DistributionCustomizer.prototype = { this._ini.getString("Global", "id") + ".bookmarksProcessed"; } - let bmProcessed = false; - try { - bmProcessed = this._prefs.getBoolPref(bmProcessedPref); - } - catch (e) {} + let bmProcessed = this._prefs.getBoolPref(bmProcessedPref, false); if (!bmProcessed) { if (sections["BookmarksMenu"]) -- cgit v1.2.3