summaryrefslogtreecommitdiffstats
path: root/application/palemoon/components/feeds
diff options
context:
space:
mode:
Diffstat (limited to 'application/palemoon/components/feeds')
-rw-r--r--application/palemoon/components/feeds/FeedWriter.js19
-rw-r--r--application/palemoon/components/feeds/WebContentConverter.js9
2 files changed, 5 insertions, 23 deletions
diff --git a/application/palemoon/components/feeds/FeedWriter.js b/application/palemoon/components/feeds/FeedWriter.js
index d704835bb..facde5815 100644
--- a/application/palemoon/components/feeds/FeedWriter.js
+++ b/application/palemoon/components/feeds/FeedWriter.js
@@ -18,12 +18,7 @@ function LOG(str) {
var prefB = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefBranch);
- var shouldLog = false;
- try {
- shouldLog = prefB.getBoolPref("feeds.log");
- }
- catch (ex) {
- }
+ var shouldLog = prefB.getBoolPref("feeds.log", false);
if (shouldLog)
dump("*** Feeds: " + str + "\n");
@@ -874,11 +869,7 @@ FeedWriter.prototype = {
Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefBranch);
- var handler = "bookmarks";
- try {
- handler = prefs.getCharPref(getPrefReaderForType(feedType));
- }
- catch (ex) { }
+ var handler = prefs.getCharPref(getPrefReaderForType(feedType), "bookmarks");
switch (handler) {
case "web": {
@@ -1076,11 +1067,7 @@ FeedWriter.prototype = {
.addEventListener("command", this, false);
// first-run ui
- var showFirstRunUI = true;
- try {
- showFirstRunUI = prefs.getBoolPref(PREF_SHOW_FIRST_RUN_UI);
- }
- catch (ex) { }
+ var showFirstRunUI = prefs.getBoolPref(PREF_SHOW_FIRST_RUN_UI, true);
if (showFirstRunUI) {
var textfeedinfo1, textfeedinfo2;
switch (feedType) {
diff --git a/application/palemoon/components/feeds/WebContentConverter.js b/application/palemoon/components/feeds/WebContentConverter.js
index 41679b028..42e2edee0 100644
--- a/application/palemoon/components/feeds/WebContentConverter.js
+++ b/application/palemoon/components/feeds/WebContentConverter.js
@@ -436,13 +436,8 @@ WebContentConverterRegistrar.prototype = {
// check if it is in the black list
var pb = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
- var allowed;
- try {
- allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "." + aProtocol);
- }
- catch (e) {
- allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "-default");
- }
+ var allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "." + aProtocol,
+ pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "-default"));
if (!allowed) {
// XXX this should be a "security exception" according to spec
throw("Not allowed to register a protocol handler for " + aProtocol);