diff options
author | Ascrod <32915892+Ascrod@users.noreply.github.com> | 2019-04-08 20:36:18 -0400 |
---|---|---|
committer | Ascrod <32915892+Ascrod@users.noreply.github.com> | 2019-04-13 11:37:45 -0400 |
commit | c7796280a9b5600fb15a4c170ca3d3f4d4d9e535 (patch) | |
tree | 9e1fbdd8600e3ed4d7747dbdd8cb11bdb431d287 /uriloader/exthandler | |
parent | 609a7215e6ef705fd098fd4adb4f922795ff1119 (diff) | |
download | uxp-c7796280a9b5600fb15a4c170ca3d3f4d4d9e535.tar.gz |
Issue #991 Part 4: Network and URILoader
Diffstat (limited to 'uriloader/exthandler')
-rw-r--r-- | uriloader/exthandler/nsHandlerService.js | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/uriloader/exthandler/nsHandlerService.js b/uriloader/exthandler/nsHandlerService.js index c932f9f5dc..5e6356ac2e 100644 --- a/uriloader/exthandler/nsHandlerService.js +++ b/uriloader/exthandler/nsHandlerService.js @@ -352,17 +352,11 @@ HandlerService.prototype = { var prefSvc = Cc["@mozilla.org/preferences-service;1"]. getService(Ci.nsIPrefService); var prefBranch = prefSvc.getBranch("network.protocol-handler."); - try { - alwaysAsk = prefBranch.getBoolPref("warn-external." + type); - } catch (e) { - // will throw if pref didn't exist. - try { - alwaysAsk = prefBranch.getBoolPref("warn-external-default"); - } catch (e) { - // Nothing to tell us what to do, so be paranoid and prompt. - alwaysAsk = true; - } - } + // If neither of the prefs exists, be paranoid and prompt. + alwaysAsk = + prefBranch.getBoolPref("warn-external." + type, + prefBranch.getBoolPref("warn-external-default", + true)); } aHandlerInfo.alwaysAskBeforeHandling = alwaysAsk; |