diff options
author | Ascrod <32915892+Ascrod@users.noreply.github.com> | 2019-04-08 19:58:00 -0400 |
---|---|---|
committer | Ascrod <32915892+Ascrod@users.noreply.github.com> | 2019-04-13 11:37:45 -0400 |
commit | 7591326915a100b54ca17ad6fedb391645bac6b5 (patch) | |
tree | 023fc0d4fd451dda98899e1da27998c072865d9a /application/basilisk/components/distribution.js | |
parent | 9a37ab727e68f44e26e04b18f2cab40a0ac4fdb5 (diff) | |
download | UXP-7591326915a100b54ca17ad6fedb391645bac6b5.tar UXP-7591326915a100b54ca17ad6fedb391645bac6b5.tar.gz UXP-7591326915a100b54ca17ad6fedb391645bac6b5.tar.lz UXP-7591326915a100b54ca17ad6fedb391645bac6b5.tar.xz UXP-7591326915a100b54ca17ad6fedb391645bac6b5.zip |
Issue #991 Part 2: Basilisk
Diffstat (limited to 'application/basilisk/components/distribution.js')
-rw-r--r-- | application/basilisk/components/distribution.js | 19 |
1 files changed, 3 insertions, 16 deletions
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"]) |