Bug 1570212 - Convert dom.allow_XUL_XBL_for_file to a static pref. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D40153
This commit is contained in:
@@ -307,7 +307,6 @@ uint32_t nsContentUtils::sRunnersCountAtFirstBlocker = 0;
|
|||||||
nsIInterfaceRequestor* nsContentUtils::sSameOriginChecker = nullptr;
|
nsIInterfaceRequestor* nsContentUtils::sSameOriginChecker = nullptr;
|
||||||
|
|
||||||
bool nsContentUtils::sIsHandlingKeyBoardEvent = false;
|
bool nsContentUtils::sIsHandlingKeyBoardEvent = false;
|
||||||
bool nsContentUtils::sAllowXULXBL_for_file = false;
|
|
||||||
|
|
||||||
nsString* nsContentUtils::sShiftText = nullptr;
|
nsString* nsContentUtils::sShiftText = nullptr;
|
||||||
nsString* nsContentUtils::sControlText = nullptr;
|
nsString* nsContentUtils::sControlText = nullptr;
|
||||||
@@ -621,9 +620,6 @@ nsresult nsContentUtils::Init() {
|
|||||||
|
|
||||||
sBlockedScriptRunners = new AutoTArray<nsCOMPtr<nsIRunnable>, 8>;
|
sBlockedScriptRunners = new AutoTArray<nsCOMPtr<nsIRunnable>, 8>;
|
||||||
|
|
||||||
Preferences::AddBoolVarCache(&sAllowXULXBL_for_file,
|
|
||||||
"dom.allow_XUL_XBL_for_file");
|
|
||||||
|
|
||||||
#ifndef RELEASE_OR_BETA
|
#ifndef RELEASE_OR_BETA
|
||||||
sBypassCSSOMOriginCheck = getenv("MOZ_BYPASS_CSSOM_ORIGIN_CHECK");
|
sBypassCSSOMOriginCheck = getenv("MOZ_BYPASS_CSSOM_ORIGIN_CHECK");
|
||||||
#endif
|
#endif
|
||||||
@@ -6235,7 +6231,8 @@ bool nsContentUtils::AllowXULXBLForPrincipal(nsIPrincipal* aPrincipal) {
|
|||||||
aPrincipal->GetURI(getter_AddRefs(princURI));
|
aPrincipal->GetURI(getter_AddRefs(princURI));
|
||||||
|
|
||||||
return princURI &&
|
return princURI &&
|
||||||
((sAllowXULXBL_for_file && SchemeIs(princURI, "file")) ||
|
((StaticPrefs::dom_allow_XUL_XBL_for_file() &&
|
||||||
|
SchemeIs(princURI, "file")) ||
|
||||||
IsSitePermAllow(aPrincipal, NS_LITERAL_CSTRING("allowXULXBL")));
|
IsSitePermAllow(aPrincipal, NS_LITERAL_CSTRING("allowXULXBL")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3236,7 +3236,6 @@ class nsContentUtils {
|
|||||||
static nsIInterfaceRequestor* sSameOriginChecker;
|
static nsIInterfaceRequestor* sSameOriginChecker;
|
||||||
|
|
||||||
static bool sIsHandlingKeyBoardEvent;
|
static bool sIsHandlingKeyBoardEvent;
|
||||||
static bool sAllowXULXBL_for_file;
|
|
||||||
#ifndef RELEASE_OR_BETA
|
#ifndef RELEASE_OR_BETA
|
||||||
static bool sBypassCSSOMOriginCheck;
|
static bool sBypassCSSOMOriginCheck;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1126,6 +1126,11 @@
|
|||||||
value: true
|
value: true
|
||||||
mirror: always
|
mirror: always
|
||||||
|
|
||||||
|
- name: dom.allow_XUL_XBL_for_file
|
||||||
|
type: bool
|
||||||
|
value: false
|
||||||
|
mirror: always
|
||||||
|
|
||||||
# Is support for automatically removing replaced filling animations enabled?
|
# Is support for automatically removing replaced filling animations enabled?
|
||||||
- name: dom.animations-api.autoremove.enabled
|
- name: dom.animations-api.autoremove.enabled
|
||||||
type: bool
|
type: bool
|
||||||
|
|||||||
Reference in New Issue
Block a user