| 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 f3f9a43dc9815393d7038c17ca56a3aac42d80e8..554bbf9da159c86221ee88493d13c9461ac800c2 100644
|
| --- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
|
| @@ -43,6 +43,7 @@
|
| #include "core/frame/SubresourceIntegrity.h"
|
| #include "core/frame/UseCounter.h"
|
| #include "core/frame/csp/ContentSecurityPolicy.h"
|
| +#include "core/html/CrossOriginAttribute.h"
|
| #include "core/html/HTMLScriptElement.h"
|
| #include "core/html/imports/HTMLImport.h"
|
| #include "core/html/parser/HTMLParserIdioms.h"
|
| @@ -290,9 +291,9 @@ bool ScriptLoader::fetchScript(const String& sourceUrl, FetchRequest::DeferOptio
|
| if (!stripLeadingAndTrailingHTMLSpaces(sourceUrl).isEmpty()) {
|
| FetchRequest request(ResourceRequest(elementDocument->completeURL(sourceUrl)), m_element->localName());
|
|
|
| - AtomicString crossOriginMode = m_element->fastGetAttribute(HTMLNames::crossoriginAttr);
|
| - if (!crossOriginMode.isNull())
|
| - request.setCrossOriginAccessControl(elementDocument->securityOrigin(), crossOriginMode);
|
| + CrossOriginAttributeValue crossOrigin = crossOriginAttributeValue(m_element->fastGetAttribute(HTMLNames::crossoriginAttr));
|
| + if (crossOrigin != CrossOriginAttributeNotSet)
|
| + request.setCrossOriginAccessControl(elementDocument->securityOrigin(), crossOrigin);
|
| request.setCharset(scriptCharset());
|
|
|
| bool scriptPassesCSP = elementDocument->contentSecurityPolicy()->allowScriptWithNonce(m_element->fastGetAttribute(HTMLNames::nonceAttr));
|
|
|