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

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

Issue 2842923002: Support Inline module script (Closed)
Patch Set: Created 3 years, 7 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 "bindings/core/v8/V8BindingForCore.h"
9 #include "v8/include/v8.h" 10 #include "v8/include/v8.h"
10 #include "bindings/core/v8/V8BindingForCore.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 void ModuleScript::SetInstantiationErrorAndClearRecord(ScriptValue error) { 14 void ModuleScript::SetInstantiationErrorAndClearRecord(ScriptValue error) {
15 // Implements Step 7.1 of: 15 // Implements Step 7.1 of:
16 // https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-scri pt-graph-fetching-procedure 16 // https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-scri pt-graph-fetching-procedure
17 17
18 // "set script's instantiation state to "errored", ..." 18 // "set script's instantiation state to "errored", ..."
19 DCHECK_EQ(instantiation_state_, ModuleInstantiationState::kUninstantiated); 19 DCHECK_EQ(instantiation_state_, ModuleInstantiationState::kUninstantiated);
20 instantiation_state_ = ModuleInstantiationState::kErrored; 20 instantiation_state_ = ModuleInstantiationState::kErrored;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 return true; 61 return true;
62 } 62 }
63 63
64 void ModuleScript::RunScript(LocalFrame* frame, const SecurityOrigin*) const { 64 void ModuleScript::RunScript(LocalFrame* frame, const SecurityOrigin*) const {
65 settings_object_->ExecuteModule(this); 65 settings_object_->ExecuteModule(this);
66 } 66 }
67 67
68 String ModuleScript::InlineSourceTextForCSP() const { 68 String ModuleScript::InlineSourceTextForCSP() const {
69 // Currently we don't support inline module scripts. 69 // Currently we don't support inline module scripts.
70 // TODO(hiroshige): Implement this. 70 // TODO(hiroshige): Implement this.
71 NOTREACHED();
72 return String(); 71 return String();
73 } 72 }
74 73
75 } // namespace blink 74 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698