summaryrefslogtreecommitdiffstats
path: root/application/basilisk/components/feeds
diff options
context:
space:
mode:
authorAscrod <32915892+Ascrod@users.noreply.github.com>2019-04-08 19:58:00 -0400
committerAscrod <32915892+Ascrod@users.noreply.github.com>2019-04-13 11:37:45 -0400
commit7591326915a100b54ca17ad6fedb391645bac6b5 (patch)
tree023fc0d4fd451dda98899e1da27998c072865d9a /application/basilisk/components/feeds
parent9a37ab727e68f44e26e04b18f2cab40a0ac4fdb5 (diff)
downloadUXP-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/feeds')
-rw-r--r--application/basilisk/components/feeds/FeedWriter.js7
-rw-r--r--application/basilisk/components/feeds/WebContentConverter.js9
2 files changed, 3 insertions, 13 deletions
diff --git a/application/basilisk/components/feeds/FeedWriter.js b/application/basilisk/components/feeds/FeedWriter.js
index 20f1399b0..ceb2a7e2f 100644
--- a/application/basilisk/components/feeds/FeedWriter.js
+++ b/application/basilisk/components/feeds/FeedWriter.js
@@ -19,12 +19,7 @@ function LOG(str) {
let prefB = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefBranch);
- let shouldLog = false;
- try {
- shouldLog = prefB.getBoolPref("feeds.log");
- }
- catch (ex) {
- }
+ let shouldLog = prefB.getBoolPref("feeds.log", false);
if (shouldLog)
dump("*** Feeds: " + str + "\n");
diff --git a/application/basilisk/components/feeds/WebContentConverter.js b/application/basilisk/components/feeds/WebContentConverter.js
index 2cb5cd145..159eca7c2 100644
--- a/application/basilisk/components/feeds/WebContentConverter.js
+++ b/application/basilisk/components/feeds/WebContentConverter.js
@@ -187,13 +187,8 @@ const Utils = {
// check if it is in the black list
let pb = Services.prefs;
- let allowed;
- try {
- allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "." + aProtocol);
- }
- catch (e) {
- allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "-default");
- }
+ let allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "." + aProtocol,
+ pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "-default"));
if (!allowed) {
throw this.getSecurityError(
`Not allowed to register a protocol handler for ${aProtocol}`,