mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1147946, part 2 - Move body of check inside prior if in XULContentSinkImpl::OpenScript(). r=baku
This commit is contained in:
parent
f2444c8eab
commit
d574337098
@ -887,12 +887,8 @@ XULContentSinkImpl::OpenScript(const char16_t** aAttributes,
|
|||||||
if (nsContentUtils::IsJavascriptMIMEType(mimeType)) {
|
if (nsContentUtils::IsJavascriptMIMEType(mimeType)) {
|
||||||
langID = nsIProgrammingLanguage::JAVASCRIPT;
|
langID = nsIProgrammingLanguage::JAVASCRIPT;
|
||||||
version = JSVERSION_LATEST;
|
version = JSVERSION_LATEST;
|
||||||
} else {
|
|
||||||
langID = nsIProgrammingLanguage::UNKNOWN;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (langID != nsIProgrammingLanguage::UNKNOWN) {
|
// Get the version string, and ensure that JavaScript supports it.
|
||||||
// Get the version string, and ensure the language supports it.
|
|
||||||
nsAutoString versionName;
|
nsAutoString versionName;
|
||||||
rv = parser.GetParameter("version", versionName);
|
rv = parser.GetParameter("version", versionName);
|
||||||
|
|
||||||
@ -901,6 +897,8 @@ XULContentSinkImpl::OpenScript(const char16_t** aAttributes,
|
|||||||
} else if (rv != NS_ERROR_INVALID_ARG) {
|
} else if (rv != NS_ERROR_INVALID_ARG) {
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
langID = nsIProgrammingLanguage::UNKNOWN;
|
||||||
}
|
}
|
||||||
} else if (key.EqualsLiteral("language")) {
|
} else if (key.EqualsLiteral("language")) {
|
||||||
// Language is deprecated, and the impl in nsScriptLoader ignores the
|
// Language is deprecated, and the impl in nsScriptLoader ignores the
|
||||||
|
Loading…
Reference in New Issue
Block a user