Bug 1417209 - Do not fail when version parameter is found. r?mrbkap
I used ReportToConsoleNonLocalized to make the patch upliftable.
MozReview-Commit-ID: LsOBOfzU9Hr
--- a/dom/xul/nsXULContentSink.cpp
+++ b/dom/xul/nsXULContentSink.cpp
@@ -863,17 +863,23 @@ XULContentSinkImpl::OpenScript(const cha
isJavaScript = true;
version = JSVERSION_DEFAULT;
// Get the version string, and ensure that JavaScript supports it.
nsAutoString versionName;
rv = parser.GetParameter("version", versionName);
if (NS_SUCCEEDED(rv)) {
- version = JSVERSION_UNKNOWN;
+ nsContentUtils::ReportToConsoleNonLocalized(
+ NS_LITERAL_STRING("Versioned JavaScripts are no longer supported. "
+ "Please remove the version parameter."),
+ nsIScriptError::errorFlag,
+ NS_LITERAL_CSTRING("XUL Document"),
+ nullptr, mDocumentURL, EmptyString(), aLineNumber);
+ isJavaScript = false;
} else if (rv != NS_ERROR_INVALID_ARG) {
return rv;
}
} else {
isJavaScript = false;
}
} else if (key.EqualsLiteral("language")) {
// Language is deprecated, and the impl in ScriptLoader ignores the