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

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

Issue 2844413003: Introduce ModuleScript::CreateInternal() (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ModuleScript.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c63b18ae7689442020a6ecf3d84dfb8fe101c2c8 100644
--- a/third_party/WebKit/Source/core/dom/ModuleScript.h
+++ b/third_party/WebKit/Source/core/dom/ModuleScript.h
@@ -39,16 +39,15 @@ class CORE_EXPORT ModuleScript final : public Script, public TraceWrapperBase {
WebURLRequest::FetchCredentialsMode,
AccessControlStatus);
- static ModuleScript* CreateForTest(
- Modulator* settings_object,
- ScriptModule record,
- const KURL& base_url,
- const String& nonce,
- ParserDisposition parser_state,
- WebURLRequest::FetchCredentialsMode credentials_mode) {
- return new ModuleScript(settings_object, record, base_url, nonce,
- parser_state, credentials_mode);
- }
+ // Mostly corresponds to Create() but accepts ScriptModule as the argument
+ // and allows null ScriptModule.
+ static ModuleScript* CreateForTest(Modulator*,
+ ScriptModule,
+ const KURL& base_url,
+ const String& nonce,
+ ParserDisposition,
+ WebURLRequest::FetchCredentialsMode);
+
~ModuleScript() override = default;
const ScriptModule& Record() const { return record_; }
@@ -93,6 +92,13 @@ class CORE_EXPORT ModuleScript final : public Script, public TraceWrapperBase {
parser_state_(parser_state),
credentials_mode_(credentials_mode) {}
+ static ModuleScript* CreateInternal(Modulator*,
+ ScriptModule,
+ const KURL& base_url,
+ const String& nonce,
+ ParserDisposition,
+ WebURLRequest::FetchCredentialsMode);
+
ScriptType GetScriptType() const override { return ScriptType::kModule; }
bool IsEmpty() const override;
bool CheckMIMETypeBeforeRunScript(Document* context_document,
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ModuleScript.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698