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

Side by Side Diff: third_party/WebKit/Source/core/dom/ModuleScript.cpp

Issue 2555653002: [WIP Prototype] ES6 https://html.spec.whatwg.org/#fetch-a-single-module-script implementation (Closed)
Patch Set: rebased 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW
« 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