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 | 888331c540fd273d4ea0c81fdfe4f85c9456e0e4 (patch) | |
tree | 9e1fbdd8600e3ed4d7747dbdd8cb11bdb431d287 /uriloader | |
parent | 4d98f30b5316a6ff24e32cc6ba4a84c3fb1acf9c (diff) | |
download | aura-central-888331c540fd273d4ea0c81fdfe4f85c9456e0e4.tar.gz |
Issue mcp-graveyard/UXP%991 Part 4: Network and URILoader
Diffstat (limited to 'uriloader')
-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 c932f9f5d..5e6356ac2 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; |