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

Side by Side Diff: third_party/WebKit/Source/core/dom/ModuleMap.h

Issue 2860993002: [ES6 modules] ModuleMap::GetFetchedModuleScript to return nullptr when entry not found / "fetching" (Closed)
Patch Set: update Modulator.h comment too 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 #ifndef ModuleMap_h 5 #ifndef ModuleMap_h
6 #define ModuleMap_h 6 #define ModuleMap_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "platform/bindings/ScriptWrappable.h" 9 #include "platform/bindings/ScriptWrappable.h"
10 #include "platform/bindings/TraceWrapperMember.h" 10 #include "platform/bindings/TraceWrapperMember.h"
(...skipping 23 matching lines...) Expand all
34 } 34 }
35 DECLARE_TRACE(); 35 DECLARE_TRACE();
36 DECLARE_TRACE_WRAPPERS(); 36 DECLARE_TRACE_WRAPPERS();
37 37
38 // https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-single-modul e-script 38 // https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-single-modul e-script
39 void FetchSingleModuleScript(const ModuleScriptFetchRequest&, 39 void FetchSingleModuleScript(const ModuleScriptFetchRequest&,
40 ModuleGraphLevel, 40 ModuleGraphLevel,
41 SingleModuleClient*); 41 SingleModuleClient*);
42 42
43 // Synchronously get the ModuleScript for a given URL. 43 // Synchronously get the ModuleScript for a given URL.
44 // Note: fetchSingleModuleScript of the ModuleScript must be complete before 44 // If the URL wasn't fetched, or is currently being fetched, this returns a
45 // calling this. 45 // nullptr.
46 ModuleScript* GetFetchedModuleScript(const KURL&) const; 46 ModuleScript* GetFetchedModuleScript(const KURL&) const;
47 47
48 Modulator* GetModulator() { return modulator_; } 48 Modulator* GetModulator() { return modulator_; }
49 49
50 private: 50 private:
51 explicit ModuleMap(Modulator*); 51 explicit ModuleMap(Modulator*);
52 52
53 using MapImpl = HeapHashMap<KURL, TraceWrapperMember<Entry>>; 53 using MapImpl = HeapHashMap<KURL, TraceWrapperMember<Entry>>;
54 54
55 // A module map is a map of absolute URLs to map entry. 55 // A module map is a map of absolute URLs to map entry.
56 MapImpl map_; 56 MapImpl map_;
57 57
58 Member<Modulator> modulator_; 58 Member<Modulator> modulator_;
59 }; 59 };
60 60
61 } // namespace blink 61 } // namespace blink
62 62
63 #endif 63 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Modulator.h ('k') | third_party/WebKit/Source/core/dom/ModuleMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698