mozilla bug 382182

This commit is contained in:
Ryan Nematz 2018-06-14 23:54:53 -04:00
parent 41b311b27e
commit 769e4b1d06
3 changed files with 5 additions and 0 deletions

View File

@ -211,6 +211,9 @@ nsParserUtils::IsJavaScriptLanguage(const nsString& aName, const char* *aVersion
else if (aName.LowerCaseEqualsLiteral("javascript1.7")) {
version = JSVERSION_1_7;
}
else if (aName.LowerCaseEqualsLiteral("javascript1.8")) {
version = JSVERSION_1_8;
}
if (version == JSVERSION_UNKNOWN)
return PR_FALSE;
*aVersion = JS_VersionToString(version);

View File

@ -1055,6 +1055,7 @@ static struct v2smap {
{JSVERSION_1_5, "1.5"},
{JSVERSION_1_6, "1.6"},
{JSVERSION_1_7, "1.7"},
{JSVERSION_1_8, "1.8"},
{JSVERSION_DEFAULT, js_default_str},
{JSVERSION_UNKNOWN, NULL}, /* must be last, NULL is sentinel */
};

View File

@ -71,6 +71,7 @@ typedef enum JSVersion {
JSVERSION_1_5 = 150,
JSVERSION_1_6 = 160,
JSVERSION_1_7 = 170,
JSVERSION_1_8 = 180,
JSVERSION_DEFAULT = 0,
JSVERSION_UNKNOWN = -1
} JSVersion;