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

Side by Side Diff: third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerRegistry.cpp

Issue 2823803003: [ES6 modules] Introduce ModuleTreeLinker (Closed)
Patch Set: yhirano2 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "core/loader/modulescript/ModuleTreeLinkerRegistry.h"
6
7 #include "core/loader/modulescript/ModuleTreeLinker.h"
8 #include "platform/weborigin/KURL.h"
9 #include "platform/weborigin/KURLHash.h"
10
11 namespace blink {
12
13 DEFINE_TRACE(ModuleTreeLinkerRegistry) {
14 visitor->Trace(active_tree_linkers_);
15 }
16
17 ModuleTreeLinker* ModuleTreeLinkerRegistry::Fetch(
18 const ModuleScriptFetchRequest& request,
19 const AncestorList& ancestor_list,
20 ModuleGraphLevel level,
21 Modulator* modulator,
22 ModuleTreeClient* client) {
23 ModuleTreeLinker* fetcher = ModuleTreeLinker::Fetch(
24 request, ancestor_list, level, modulator, this, client);
25 DCHECK(fetcher->IsFetching());
26 active_tree_linkers_.insert(fetcher);
27 return fetcher;
28 }
29
30 void ModuleTreeLinkerRegistry::ReleaseFinishedFetcher(
31 ModuleTreeLinker* fetcher) {
32 DCHECK(fetcher->HasFinished());
33
34 auto it = active_tree_linkers_.Find(fetcher);
35 DCHECK_NE(it, active_tree_linkers_.end());
36 active_tree_linkers_.erase(it);
37 }
38
39 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698