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

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

Issue 2842923002: Support Inline module script (Closed)
Patch Set: Rebase 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/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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ModulatorImpl.h ('k') | third_party/WebKit/Source/core/dom/ModuleScript.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698