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 tree_linker_registry_->FetchDescendantsForInlineScript(module_script, this, |
| 90 client); |
| 91 } |
| 92 |
87 void ModulatorImpl::FetchSingle(const ModuleScriptFetchRequest& request, | 93 void ModulatorImpl::FetchSingle(const ModuleScriptFetchRequest& request, |
88 ModuleGraphLevel level, | 94 ModuleGraphLevel level, |
89 SingleModuleClient* client) { | 95 SingleModuleClient* client) { |
90 // We ensure module-related code is not executed without the flag. | 96 // We ensure module-related code is not executed without the flag. |
91 // https://crbug.com/715376 | 97 // https://crbug.com/715376 |
92 CHECK(RuntimeEnabledFeatures::moduleScriptsEnabled()); | 98 CHECK(RuntimeEnabledFeatures::moduleScriptsEnabled()); |
93 | 99 |
94 map_->FetchSingleModuleScript(request, level, client); | 100 map_->FetchSingleModuleScript(request, level, client); |
95 } | 101 } |
96 | 102 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 visitor->Trace(loader_registry_); | 218 visitor->Trace(loader_registry_); |
213 visitor->Trace(tree_linker_registry_); | 219 visitor->Trace(tree_linker_registry_); |
214 visitor->Trace(script_module_resolver_); | 220 visitor->Trace(script_module_resolver_); |
215 } | 221 } |
216 | 222 |
217 DEFINE_TRACE_WRAPPERS(ModulatorImpl) { | 223 DEFINE_TRACE_WRAPPERS(ModulatorImpl) { |
218 visitor->TraceWrappers(map_); | 224 visitor->TraceWrappers(map_); |
219 } | 225 } |
220 | 226 |
221 } // namespace blink | 227 } // namespace blink |
OLD | NEW |