| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/dom/ModuleScript.h" | 5 #include "core/dom/ModuleScript.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScriptState.h" | 7 #include "bindings/core/v8/ScriptState.h" |
| 8 #include "bindings/core/v8/ScriptValue.h" | 8 #include "bindings/core/v8/ScriptValue.h" |
| 9 #include "v8/include/v8.h" | 9 #include "v8/include/v8.h" |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 } | 51 } |
| 52 | 52 |
| 53 bool ModuleScript::CheckMIMETypeBeforeRunScript(Document* context_document, | 53 bool ModuleScript::CheckMIMETypeBeforeRunScript(Document* context_document, |
| 54 const SecurityOrigin*) const { | 54 const SecurityOrigin*) const { |
| 55 // We don't check MIME type here because we check the MIME type in | 55 // We don't check MIME type here because we check the MIME type in |
| 56 // ModuleScriptLoader::WasModuleLoadSuccessful(). | 56 // ModuleScriptLoader::WasModuleLoadSuccessful(). |
| 57 return true; | 57 return true; |
| 58 } | 58 } |
| 59 | 59 |
| 60 void ModuleScript::RunScript(LocalFrame* frame, const SecurityOrigin*) const { | 60 void ModuleScript::RunScript(LocalFrame* frame, const SecurityOrigin*) const { |
| 61 // TODO(hiroshige): Implement this once Modulator::ExecuteModule() is landed. | 61 fprintf(stderr, "ModuleScript: isNull=%d state=%d\n", record_.IsNull(), |
| 62 NOTREACHED(); | 62 InstantiationState()); |
| 63 |
| 64 settings_object_->ExecuteModule(this); |
| 63 } | 65 } |
| 64 | 66 |
| 65 String ModuleScript::InlineSourceTextForCSP() const { | 67 String ModuleScript::InlineSourceTextForCSP() const { |
| 66 // Currently we don't support inline module scripts. | 68 // Currently we don't support inline module scripts. |
| 67 // TODO(hiroshige): Implement this. | 69 // TODO(hiroshige): Implement this. |
| 68 NOTREACHED(); | 70 NOTREACHED(); |
| 69 return String(); | 71 return String(); |
| 70 } | 72 } |
| 71 | 73 |
| 72 } // namespace blink | 74 } // namespace blink |
| OLD | NEW |