Bug 1418246 - Return valid columnNumber value in CSP violation events, r=ckerschb

This commit is contained in:
Andrea Marchesini
2018-07-05 08:21:04 +02:00
parent 8766ceb571
commit e4ccc82e67
37 changed files with 209 additions and 71 deletions

View File

@@ -231,7 +231,7 @@ HTMLScriptElement::FreezeExecutionAttrs(nsIDocument* aOwnerDoc)
NS_LITERAL_CSTRING("HTML"), OwnerDoc(),
nsContentUtils::eDOM_PROPERTIES, "ScriptSourceInvalidUri",
params, ArrayLength(params), nullptr,
EmptyString(), GetScriptLineNumber());
EmptyString(), GetScriptLineNumber(), GetScriptColumnNumber());
}
} else {
const char16_t* params[] = { u"src" };
@@ -240,7 +240,7 @@ HTMLScriptElement::FreezeExecutionAttrs(nsIDocument* aOwnerDoc)
NS_LITERAL_CSTRING("HTML"), OwnerDoc(),
nsContentUtils::eDOM_PROPERTIES, "ScriptSourceEmpty",
params, ArrayLength(params), nullptr,
EmptyString(), GetScriptLineNumber());
EmptyString(), GetScriptLineNumber(), GetScriptColumnNumber());
}
// At this point mUri will be null for invalid URLs.