Backed out 2 changesets (bug 1529337) for awaiting decision on implementing other CSP 3 features
Backed out changeset 12cd014c46e8 (bug 1529337) Backed out changeset f1489d7cf1a1 (bug 1529337)
This commit is contained in:
@@ -788,6 +788,8 @@ bool ScriptLoader::PreloadURIComparator::Equals(const PreloadInfo& aPi,
|
||||
static bool CSPAllowsInlineScript(nsIScriptElement* aElement,
|
||||
Document* aDocument) {
|
||||
nsCOMPtr<nsIContentSecurityPolicy> csp = aDocument->GetCsp();
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
if (!csp) {
|
||||
// no CSP --> allow
|
||||
return true;
|
||||
@@ -808,8 +810,8 @@ static bool CSPAllowsInlineScript(nsIScriptElement* aElement,
|
||||
aElement->GetParserCreated() != mozilla::dom::NOT_FROM_PARSER;
|
||||
|
||||
bool allowInlineScript = false;
|
||||
nsresult rv = csp->GetAllowsInline(
|
||||
nsIContentSecurityPolicy::SCRIPT_SRC_ELEM_DIRECTIVE, nonce, parserCreated,
|
||||
rv = csp->GetAllowsInline(
|
||||
nsIContentSecurityPolicy::SCRIPT_SRC_DIRECTIVE, nonce, parserCreated,
|
||||
scriptContent, nullptr /* nsICSPEventListener */, u""_ns,
|
||||
aElement->GetScriptLineNumber(), aElement->GetScriptColumnNumber(),
|
||||
&allowInlineScript);
|
||||
|
||||
Reference in New Issue
Block a user