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 9e2845e11cfaac2eddea279dfdb06a7ecd3826fc..c235942ee5ac9d0ac4d10463c63db22e018c3f83 100644 |
--- a/third_party/WebKit/Source/core/dom/ModuleScript.cpp |
+++ b/third_party/WebKit/Source/core/dom/ModuleScript.cpp |
@@ -4,9 +4,7 @@ |
#include "core/dom/ModuleScript.h" |
-#include "bindings/core/v8/ScriptState.h" |
-#include "bindings/core/v8/ScriptValue.h" |
-#include "v8/include/v8.h" |
+#include "bindings/core/v8/V8Binding.h" |
namespace blink { |
@@ -22,6 +20,9 @@ void ModuleScript::SetInstantiationErrorAndClearRecord(ScriptValue error) { |
DCHECK(!error.IsEmpty()); |
{ |
ScriptState::Scope scope(error.GetScriptState()); |
+ // String str = ToCoreString( |
+ // error.V8Value()->ToString(error.GetContext()).ToLocalChecked()); |
+ // fprintf(stderr, "[%s]\n", str.Utf8().Data()); |
instantiation_error_.Set(error.GetIsolate(), error.V8Value()); |
} |
@@ -58,8 +59,7 @@ bool ModuleScript::CheckMIMETypeBeforeRunScript(Document* context_document, |
} |
void ModuleScript::RunScript(LocalFrame* frame, const SecurityOrigin*) const { |
- // TODO(hiroshige): Implement this once Modulator::ExecuteModule() is landed. |
- NOTREACHED(); |
+ settings_object_->ExecuteModule(this); |
} |
String ModuleScript::InlineSourceTextForCSP() const { |