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;
|
||||
|
||||
bool nsContentUtils::sIsHandlingKeyBoardEvent = false;
|
||||
bool nsContentUtils::sAllowXULXBL_for_file = false;
|
||||
|
||||
nsString* nsContentUtils::sShiftText = nullptr;
|
||||
nsString* nsContentUtils::sControlText = nullptr;
|
||||
@@ -621,9 +620,6 @@ nsresult nsContentUtils::Init() {
|
||||
|
||||
sBlockedScriptRunners = new AutoTArray<nsCOMPtr<nsIRunnable>, 8>;
|
||||
|
||||
Preferences::AddBoolVarCache(&sAllowXULXBL_for_file,
|
||||
"dom.allow_XUL_XBL_for_file");
|
||||
|
||||
#ifndef RELEASE_OR_BETA
|
||||
sBypassCSSOMOriginCheck = getenv("MOZ_BYPASS_CSSOM_ORIGIN_CHECK");
|
||||
#endif
|
||||
@@ -6235,7 +6231,8 @@ bool nsContentUtils::AllowXULXBLForPrincipal(nsIPrincipal* aPrincipal) {
|
||||
aPrincipal->GetURI(getter_AddRefs(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")));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user