| 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 0a9402b302f3e530645f10d5a6397add4059de80..54c374997963907b76b8fd1d7bd5b91d737fa1ba 100644
|
| --- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
|
| @@ -523,9 +523,17 @@ bool ScriptLoader::fetchScript(const String& sourceUrl,
|
| // 21. "If the element has a src content attribute, run these substeps:"
|
| if (!stripLeadingAndTrailingHTMLSpaces(sourceUrl).isEmpty()) {
|
| // 21.4. "Parse src relative to the element's node document."
|
| - FetchRequest request(
|
| - ResourceRequest(elementDocument->completeURL(sourceUrl)),
|
| - m_element->localName());
|
| + ResourceRequest resourceRequest(elementDocument->completeURL(sourceUrl));
|
| +
|
| + // [Intervention]
|
| + if (m_documentWriteIntervention ==
|
| + DocumentWriteIntervention::FetchDocWrittenScriptDeferIdle) {
|
| + resourceRequest.setHTTPHeaderField(
|
| + "Intervention",
|
| + "<https://www.chromestatus.com/feature/5718547946799104>");
|
| + }
|
| +
|
| + FetchRequest request(resourceRequest, m_element->localName());
|
|
|
| // 15. "Let CORS setting be the current state of the element's
|
| // crossorigin content attribute."
|
| @@ -570,14 +578,6 @@ bool ScriptLoader::fetchScript(const String& sourceUrl,
|
| request.setIntegrityMetadata(metadataSet);
|
| }
|
|
|
| - // [Intervention]
|
| - if (m_documentWriteIntervention ==
|
| - DocumentWriteIntervention::FetchDocWrittenScriptDeferIdle) {
|
| - request.mutableResourceRequest().setHTTPHeaderField(
|
| - "Intervention",
|
| - "<https://www.chromestatus.com/feature/5718547946799104>");
|
| - }
|
| -
|
| // 21.6. "Switch on the script's type:"
|
|
|
| // - "classic":
|
|
|