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/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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
77 const AncestorList& ancestor_list, | 77 const AncestorList& ancestor_list, |
78 ModuleGraphLevel level, | 78 ModuleGraphLevel level, |
79 ModuleTreeClient* client) { | 79 ModuleTreeClient* client) { |
80 // We ensure module-related code is not executed without the flag. | 80 // We ensure module-related code is not executed without the flag. |
81 // https://crbug.com/715376 | 81 // https://crbug.com/715376 |
82 CHECK(RuntimeEnabledFeatures::moduleScriptsEnabled()); | 82 CHECK(RuntimeEnabledFeatures::moduleScriptsEnabled()); |
83 | 83 |
84 tree_linker_registry_->Fetch(request, ancestor_list, level, this, client); | 84 tree_linker_registry_->Fetch(request, ancestor_list, level, this, client); |
85 } | 85 } |
86 | 86 |
87 void ModulatorImpl::FetchDescendantsForInlineScript(ModuleScript* module_script, | |
88 ModuleTreeClient* client) { | |
89 map_->SetInlineModuleScript(module_script); | |
hiroshige
2017/04/26 04:48:13
SetInlineModuleScript() is currently needed to put
hiroshige
2017/04/27 21:57:20
Fixed.
| |
90 tree_linker_registry_->FetchDescendantsForInlineScript(module_script, this, | |
91 client); | |
92 } | |
93 | |
87 void ModulatorImpl::FetchSingle(const ModuleScriptFetchRequest& request, | 94 void ModulatorImpl::FetchSingle(const ModuleScriptFetchRequest& request, |
88 ModuleGraphLevel level, | 95 ModuleGraphLevel level, |
89 SingleModuleClient* client) { | 96 SingleModuleClient* client) { |
90 // We ensure module-related code is not executed without the flag. | 97 // We ensure module-related code is not executed without the flag. |
91 // https://crbug.com/715376 | 98 // https://crbug.com/715376 |
92 CHECK(RuntimeEnabledFeatures::moduleScriptsEnabled()); | 99 CHECK(RuntimeEnabledFeatures::moduleScriptsEnabled()); |
93 | 100 |
94 map_->FetchSingleModuleScript(request, level, client); | 101 map_->FetchSingleModuleScript(request, level, client); |
95 } | 102 } |
96 | 103 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
198 visitor->Trace(loader_registry_); | 205 visitor->Trace(loader_registry_); |
199 visitor->Trace(tree_linker_registry_); | 206 visitor->Trace(tree_linker_registry_); |
200 visitor->Trace(script_module_resolver_); | 207 visitor->Trace(script_module_resolver_); |
201 } | 208 } |
202 | 209 |
203 DEFINE_TRACE_WRAPPERS(ModulatorImpl) { | 210 DEFINE_TRACE_WRAPPERS(ModulatorImpl) { |
204 visitor->TraceWrappers(map_); | 211 visitor->TraceWrappers(map_); |
205 } | 212 } |
206 | 213 |
207 } // namespace blink | 214 } // namespace blink |
OLD | NEW |