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) { | |
kouhei (in TOK)
2017/04/27 03:47:25
We need to call resolver->RegisterModuleScript() s
hiroshige
2017/04/27 21:57:20
Done in https://codereview.chromium.org/2845743003
| |
89 // FOXME: Remove this line and revert the changes in ModuleMap before commit. | |
90 // map_->SetInlineModuleScript(module_script); | |
91 | |
92 tree_linker_registry_->FetchDescendantsForInlineScript(module_script, this, | |
93 client); | |
94 } | |
95 | |
87 void ModulatorImpl::FetchSingle(const ModuleScriptFetchRequest& request, | 96 void ModulatorImpl::FetchSingle(const ModuleScriptFetchRequest& request, |
88 ModuleGraphLevel level, | 97 ModuleGraphLevel level, |
89 SingleModuleClient* client) { | 98 SingleModuleClient* client) { |
90 // We ensure module-related code is not executed without the flag. | 99 // We ensure module-related code is not executed without the flag. |
91 // https://crbug.com/715376 | 100 // https://crbug.com/715376 |
92 CHECK(RuntimeEnabledFeatures::moduleScriptsEnabled()); | 101 CHECK(RuntimeEnabledFeatures::moduleScriptsEnabled()); |
93 | 102 |
94 map_->FetchSingleModuleScript(request, level, client); | 103 map_->FetchSingleModuleScript(request, level, client); |
95 } | 104 } |
96 | 105 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
203 visitor->Trace(loader_registry_); | 212 visitor->Trace(loader_registry_); |
204 visitor->Trace(tree_linker_registry_); | 213 visitor->Trace(tree_linker_registry_); |
205 visitor->Trace(script_module_resolver_); | 214 visitor->Trace(script_module_resolver_); |
206 } | 215 } |
207 | 216 |
208 DEFINE_TRACE_WRAPPERS(ModulatorImpl) { | 217 DEFINE_TRACE_WRAPPERS(ModulatorImpl) { |
209 visitor->TraceWrappers(map_); | 218 visitor->TraceWrappers(map_); |
210 } | 219 } |
211 | 220 |
212 } // namespace blink | 221 } // namespace blink |
OLD | NEW |