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

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

Issue 2780463002: Introduce blink::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.cpp
diff --git a/third_party/WebKit/Source/core/dom/ModuleScript.cpp b/third_party/WebKit/Source/core/dom/ModuleScript.cpp
index 6276ecacbf5bcb802ed8a6351ab4d82273a13f1c..ced261f0aba7c0f11f28ffeec2de898930be137d 100644
--- a/third_party/WebKit/Source/core/dom/ModuleScript.cpp
+++ b/third_party/WebKit/Source/core/dom/ModuleScript.cpp
@@ -20,9 +20,35 @@ void ModuleScript::SetInstantiationSuccess() {
instantiation_state_ = ModuleInstantiationState::kInstantiated;
}
-DEFINE_TRACE(ModuleScript) {}
+DEFINE_TRACE(ModuleScript) {
+ Script::Trace(visitor);
+}
DEFINE_TRACE_WRAPPERS(ModuleScript) {
+ Script::TraceWrappers(visitor);
visitor->TraceWrappers(instantiation_error_);
}
+bool ModuleScript::IsEmpty() const {
+ return false;
+}
+
+bool ModuleScript::CheckMIMETypeBeforeRunScript(Document* context_document,
+ 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/ModuleScript.h ('k') | third_party/WebKit/Source/core/dom/PendingScript.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698