Merge remote-tracking branch 'origin/master' into custom

This commit is contained in:
Roy Tam 2019-04-27 09:01:02 +08:00
commit 2cb30a238c
4110 changed files with 343 additions and 435849 deletions

View file

@ -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;