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

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

Issue 2781713003: Enable module scripts in ScriptLoader (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 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/ModulatorImpl.h" 5 #include "core/dom/ModulatorImpl.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/ExecutionContext.h" 8 #include "core/dom/ExecutionContext.h"
9 #include "core/dom/ModuleMap.h" 9 #include "core/dom/ModuleMap.h"
10 #include "core/dom/ModuleScript.h" 10 #include "core/dom/ModuleScript.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 ScriptState::Scope scope(script_state_.Get()); 127 ScriptState::Scope scope(script_state_.Get());
128 return script_module.Instantiate(script_state_.Get()); 128 return script_module.Instantiate(script_state_.Get());
129 } 129 }
130 130
131 Vector<String> ModulatorImpl::ModuleRequestsFromScriptModule( 131 Vector<String> ModulatorImpl::ModuleRequestsFromScriptModule(
132 ScriptModule script_module) { 132 ScriptModule script_module) {
133 ScriptState::Scope scope(script_state_.Get()); 133 ScriptState::Scope scope(script_state_.Get());
134 return script_module.ModuleRequests(script_state_.Get()); 134 return script_module.ModuleRequests(script_state_.Get());
135 } 135 }
136 136
137 void ModulatorImpl::ExecuteModule(ScriptModule script_module) { 137 void ModulatorImpl::ExecuteModule(const ModuleScript* moduleScript) {
138 ScriptState::Scope scope(script_state_.Get()); 138 ScriptState::Scope scope(script_state_.Get());
139 script_module.Evaluate(script_state_.Get()); 139 moduleScript->Record().Evaluate(script_state_.Get(), moduleScript);
140 } 140 }
141 141
142 DEFINE_TRACE(ModulatorImpl) { 142 DEFINE_TRACE(ModulatorImpl) {
143 Modulator::Trace(visitor); 143 Modulator::Trace(visitor);
144 visitor->Trace(execution_context_); 144 visitor->Trace(execution_context_);
145 visitor->Trace(fetcher_); 145 visitor->Trace(fetcher_);
146 visitor->Trace(map_); 146 visitor->Trace(map_);
147 visitor->Trace(loader_registry_); 147 visitor->Trace(loader_registry_);
148 visitor->Trace(tree_linker_registry_); 148 visitor->Trace(tree_linker_registry_);
149 visitor->Trace(script_module_resolver_); 149 visitor->Trace(script_module_resolver_);
150 } 150 }
151 151
152 DEFINE_TRACE_WRAPPERS(ModulatorImpl) { 152 DEFINE_TRACE_WRAPPERS(ModulatorImpl) {
153 visitor->TraceWrappers(map_); 153 visitor->TraceWrappers(map_);
154 } 154 }
155 155
156 } // namespace blink 156 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698