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 3f0481e799ad2980692db7fb651abe367197f4b4..a9a91f0997a9e23ce7454dedb530b5d58ca8b00f 100644 |
--- a/third_party/WebKit/Source/core/dom/ModuleScript.h |
+++ b/third_party/WebKit/Source/core/dom/ModuleScript.h |
@@ -10,6 +10,7 @@ |
#include "bindings/core/v8/ScriptWrappable.h" |
#include "bindings/core/v8/TraceWrapperV8Reference.h" |
#include "core/CoreExport.h" |
+#include "core/dom/Script.h" |
#include "platform/heap/Handle.h" |
#include "platform/loader/fetch/ResourceLoaderOptions.h" |
#include "platform/weborigin/KURL.h" |
@@ -26,9 +27,7 @@ enum class ModuleInstantiationState { |
// ModuleScript is a model object for the "module script" spec concept. |
// https://html.spec.whatwg.org/multipage/webappapis.html#module-script |
-class CORE_EXPORT ModuleScript final |
- : public GarbageCollectedFinalized<ModuleScript>, |
- public TraceWrapperBase { |
+class CORE_EXPORT ModuleScript final : public Script, public TraceWrapperBase { |
kouhei (in TOK)
2017/04/06 09:42:35
I think Script needs to be TraceWrapperBase if we
hiroshige
2017/04/06 17:36:29
Done.
|
public: |
static ModuleScript* create( |
ScriptModule record, |
@@ -39,7 +38,7 @@ class CORE_EXPORT ModuleScript final |
return new ModuleScript(record, baseURL, nonce, parserState, |
credentialsMode); |
} |
- ~ModuleScript() = default; |
+ ~ModuleScript() override = default; |
ScriptModule& record() { return m_record; } |
void clearRecord() { m_record = ScriptModule(); } |
@@ -74,6 +73,13 @@ class CORE_EXPORT ModuleScript final |
m_parserState(parserState), |
m_credentialsMode(credentialsMode) {} |
+ ScriptType scriptType() const override { return ScriptType::Module; } |
+ bool isEmpty() const override; |
+ bool checkMIMETypeBeforeRunScript(Document* contextDocument, |
+ const SecurityOrigin*) const override; |
+ void runScript(LocalFrame*, const SecurityOrigin*) const override; |
+ String inlineSourceTextForCSP() const override; |
+ |
// Note: A "module script"'s "setttings object" is ommitted, as we currently |
// always have access to the corresponding Modulator when operating on a |
// ModuleScript instance. |