mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-19 14:57:32 +09:00
Issue #991 Part 2: Basilisk
This commit is contained in:
parent
74e02af5af
commit
5d978c380c
13 changed files with 30 additions and 126 deletions
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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}`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue