Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/ModuleScript.h |
| diff --git a/third_party/WebKit/Source/core/dom/ModuleScript.h b/third_party/WebKit/Source/core/dom/ModuleScript.h |
| index 5ac8f9fff98fe2ab20909e10c2c2a5d643e68d7f..a491757610293e0831e0aa27afd9f0d2cc12b42a 100644 |
| --- a/third_party/WebKit/Source/core/dom/ModuleScript.h |
| +++ b/third_party/WebKit/Source/core/dom/ModuleScript.h |
| @@ -47,7 +47,7 @@ class CORE_EXPORT ModuleScript final : public Script, public TraceWrapperBase { |
| ParserDisposition parser_state, |
| WebURLRequest::FetchCredentialsMode credentials_mode) { |
| return new ModuleScript(settings_object, record, base_url, nonce, |
| - parser_state, credentials_mode); |
| + parser_state, credentials_mode, ""); |
|
kouhei (in TOK)
2017/04/27 03:47:25
note to self: "" is source_text
hiroshige
2017/04/27 21:57:20
Done.
|
| } |
| ~ModuleScript() override = default; |
| @@ -84,14 +84,16 @@ class CORE_EXPORT ModuleScript final : public Script, public TraceWrapperBase { |
| const KURL& base_url, |
| const String& nonce, |
| ParserDisposition parser_state, |
| - WebURLRequest::FetchCredentialsMode credentials_mode) |
| + WebURLRequest::FetchCredentialsMode credentials_mode, |
| + const String& source_text) |
| : settings_object_(settings_object), |
| record_(record), |
| base_url_(base_url), |
| instantiation_error_(this), |
| nonce_(nonce), |
| parser_state_(parser_state), |
| - credentials_mode_(credentials_mode) {} |
| + credentials_mode_(credentials_mode), |
| + source_text_(source_text) {} |
| ScriptType GetScriptType() const override { return ScriptType::kModule; } |
| bool IsEmpty() const override; |
| @@ -131,6 +133,9 @@ class CORE_EXPORT ModuleScript final : public Script, public TraceWrapperBase { |
| // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-script-credentials-mode |
| const WebURLRequest::FetchCredentialsMode credentials_mode_; |
| + |
| + // For CSP check. |
| + const String source_text_; |
| }; |
| } // namespace blink |