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

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

Issue 2780463002: Introduce blink::Script (Closed)
Patch Set: style 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.cpp
diff --git a/third_party/WebKit/Source/core/dom/ModuleScript.cpp b/third_party/WebKit/Source/core/dom/ModuleScript.cpp
index 2f9e74d601011094dc6b9ff8faaf5b50b0321c69..2ce5a8381fa51e7650a708ecdb8d1224ac702a6e 100644
--- a/third_party/WebKit/Source/core/dom/ModuleScript.cpp
+++ b/third_party/WebKit/Source/core/dom/ModuleScript.cpp
@@ -20,9 +20,34 @@ void ModuleScript::setInstantiationSuccess() {
m_instantiationState = ModuleInstantiationState::Instantiated;
}
-DEFINE_TRACE(ModuleScript) {}
+DEFINE_TRACE(ModuleScript) {
+ Script::trace(visitor);
+}
DEFINE_TRACE_WRAPPERS(ModuleScript) {
visitor->traceWrappers(m_instantiationError);
}
+bool ModuleScript::isEmpty() const {
+ return false;
+}
+
+bool ModuleScript::checkMIMETypeBeforeRunScript(Document* contextDocument,
+ const SecurityOrigin*) const {
+ // We don't check MIME type here because we check the MIME type in
+ // ModuleScriptLoader::wasModuleLoadSuccessful().
+ return true;
+}
+
+void ModuleScript::runScript(LocalFrame* frame, const SecurityOrigin*) const {
+ // TODO(hiroshige): Implement this once Modulator::executeModule() is landed.
+ NOTREACHED();
+}
+
+String ModuleScript::inlineSourceTextForCSP() const {
+ // Currently we don't support inline module scripts.
+ // TODO(hiroshige): Implement this.
+ NOTREACHED();
+ return String();
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698