Index: Source/core/dom/ScriptLoader.cpp |
diff --git a/Source/core/dom/ScriptLoader.cpp b/Source/core/dom/ScriptLoader.cpp |
index 1fbeec5f7d19ec828b64caac29e8dd73b674d5ad..ac91a97ea2e0454905f9748c10ac82cc79cde52b 100644 |
--- a/Source/core/dom/ScriptLoader.cpp |
+++ b/Source/core/dom/ScriptLoader.cpp |
@@ -260,11 +260,9 @@ bool ScriptLoader::fetchScript(const String& sourceUrl) |
if (!stripLeadingAndTrailingHTMLSpaces(sourceUrl).isEmpty()) { |
FetchRequest request(ResourceRequest(elementDocument->completeURL(sourceUrl)), m_element->localName()); |
- String crossOriginMode = m_element->fastGetAttribute(HTMLNames::crossoriginAttr); |
- if (!crossOriginMode.isNull()) { |
- StoredCredentials allowCredentials = equalIgnoringCase(crossOriginMode, "use-credentials") ? AllowStoredCredentials : DoNotAllowStoredCredentials; |
- request.setCrossOriginAccessControl(elementDocument->securityOrigin(), allowCredentials); |
- } |
+ AtomicString crossOriginMode = m_element->fastGetAttribute(HTMLNames::crossoriginAttr); |
+ if (!crossOriginMode.isNull()) |
+ request.setCrossOriginAccessControl(elementDocument->securityOrigin(), crossOriginMode); |
request.setCharset(scriptCharset()); |
bool isValidScriptNonce = elementDocument->contentSecurityPolicy()->allowScriptNonce(m_element->fastGetAttribute(HTMLNames::nonceAttr)); |