Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Unified Diff: third_party/WebKit/Source/core/dom/ModuleScript.h

Issue 2842923002: Support Inline module script (Closed)
Patch Set: Rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 4b9c5dd7bbabbe7507f4dba944fa2abb331d38d6..22002a40f486ad417cd4815badbe74b47791200e 100644
--- a/third_party/WebKit/Source/core/dom/ModuleScript.h
+++ b/third_party/WebKit/Source/core/dom/ModuleScript.h
@@ -79,16 +79,19 @@ 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) {}
- static ModuleScript* CreateInternal(Modulator*,
+ static ModuleScript* CreateInternal(const String& source_text,
+ Modulator*,
ScriptModule,
const KURL& base_url,
const String& nonce,
@@ -142,6 +145,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
« no previous file with comments | « third_party/WebKit/Source/core/dom/ModulatorImpl.cpp ('k') | third_party/WebKit/Source/core/dom/ModuleScript.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698