| Index: third_party/WebKit/Source/core/dom/ScriptLoader.cpp | 
| diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp | 
| index db640d8cb2dd13c97de3526463b65376dd7acc9a..bc799e4a33cd6ec9f015367f66920607c0f986f2 100644 | 
| --- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp | 
| +++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp | 
| @@ -147,31 +147,6 @@ void ScriptLoader::detachPendingScript() { | 
| m_pendingScript = nullptr; | 
| } | 
|  | 
| -static bool isLegacySupportedJavaScriptLanguage(const String& language) { | 
| -  // Mozilla 1.8 accepts javascript1.0 - javascript1.7, but WinIE 7 accepts only | 
| -  // javascript1.1 - javascript1.3. | 
| -  // Mozilla 1.8 and WinIE 7 both accept javascript and livescript. | 
| -  // WinIE 7 accepts ecmascript and jscript, but Mozilla 1.8 doesn't. | 
| -  // Neither Mozilla 1.8 nor WinIE 7 accept leading or trailing whitespace. | 
| -  // We want to accept all the values that either of these browsers accept, but | 
| -  // not other values. | 
| - | 
| -  // FIXME: This function is not HTML5 compliant. These belong in the MIME | 
| -  // registry as "text/javascript<version>" entries. | 
| -  return equalIgnoringASCIICase(language, "javascript") || | 
| -         equalIgnoringASCIICase(language, "javascript1.0") || | 
| -         equalIgnoringASCIICase(language, "javascript1.1") || | 
| -         equalIgnoringASCIICase(language, "javascript1.2") || | 
| -         equalIgnoringASCIICase(language, "javascript1.3") || | 
| -         equalIgnoringASCIICase(language, "javascript1.4") || | 
| -         equalIgnoringASCIICase(language, "javascript1.5") || | 
| -         equalIgnoringASCIICase(language, "javascript1.6") || | 
| -         equalIgnoringASCIICase(language, "javascript1.7") || | 
| -         equalIgnoringASCIICase(language, "livescript") || | 
| -         equalIgnoringASCIICase(language, "ecmascript") || | 
| -         equalIgnoringASCIICase(language, "jscript"); | 
| -} | 
| - | 
| void ScriptLoader::dispatchErrorEvent() { | 
| m_element->dispatchErrorEvent(); | 
| } | 
| @@ -196,14 +171,14 @@ bool ScriptLoader::isValidScriptTypeAndLanguage( | 
| return language.isEmpty() ||  // assume text/javascript. | 
| MIMETypeRegistry::isSupportedJavaScriptMIMEType("text/" + | 
| language) || | 
| -           isLegacySupportedJavaScriptLanguage(language); | 
| +           MIMETypeRegistry::isLegacySupportedJavaScriptLanguage(language); | 
| } else if (RuntimeEnabledFeatures::moduleScriptsEnabled() && | 
| type == "module") { | 
| return true; | 
| } else if (MIMETypeRegistry::isSupportedJavaScriptMIMEType( | 
| type.stripWhiteSpace()) || | 
| (supportLegacyTypes == AllowLegacyTypeInTypeAttribute && | 
| -              isLegacySupportedJavaScriptLanguage(type))) { | 
| +              MIMETypeRegistry::isLegacySupportedJavaScriptLanguage(type))) { | 
| return true; | 
| } | 
|  | 
| @@ -619,7 +594,8 @@ void ScriptLoader::logScriptMIMEType(LocalFrame* frame, | 
| if (MIMETypeRegistry::isSupportedJavaScriptMIMEType(mimeType)) | 
| return; | 
| bool isText = mimeType.startsWith("text/", TextCaseASCIIInsensitive); | 
| -  if (isText && isLegacySupportedJavaScriptLanguage(mimeType.substring(5))) | 
| +  if (isText && MIMETypeRegistry::isLegacySupportedJavaScriptLanguage( | 
| +                    mimeType.substring(5))) | 
| return; | 
| bool isSameOrigin = | 
| m_element->document().getSecurityOrigin()->canRequest(resource->url()); | 
|  |