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

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

Issue 2886123002: Revert of [ES6 modules] ModuleMap::GetFetchedModuleScript to return nullptr when entry not found / "fetching" (Closed)
Patch Set: 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 Modulator_h 5 #ifndef Modulator_h
6 #define Modulator_h 6 #define Modulator_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/dom/AncestorList.h" 9 #include "core/dom/AncestorList.h"
10 #include "platform/bindings/ScriptWrappable.h" 10 #include "platform/bindings/ScriptWrappable.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // https://html.spec.whatwg.org/#fetch-a-single-module-script 85 // https://html.spec.whatwg.org/#fetch-a-single-module-script
86 virtual void FetchSingle(const ModuleScriptFetchRequest&, 86 virtual void FetchSingle(const ModuleScriptFetchRequest&,
87 ModuleGraphLevel, 87 ModuleGraphLevel,
88 SingleModuleClient*) = 0; 88 SingleModuleClient*) = 0;
89 89
90 virtual void FetchDescendantsForInlineScript(ModuleScript*, 90 virtual void FetchDescendantsForInlineScript(ModuleScript*,
91 ModuleTreeClient*) = 0; 91 ModuleTreeClient*) = 0;
92 92
93 // Synchronously retrieves a single module script from existing module map 93 // Synchronously retrieves a single module script from existing module map
94 // entry. 94 // entry.
95 // Note: returns nullptr if the module map entry doesn't exist, or 95 // Note: returns nullptr if the module map entry is still "fetching".
96 // is still "fetching".
97 virtual ModuleScript* GetFetchedModuleScript(const KURL&) = 0; 96 virtual ModuleScript* GetFetchedModuleScript(const KURL&) = 0;
98 97
99 // https://html.spec.whatwg.org/#resolve-a-module-specifier 98 // https://html.spec.whatwg.org/#resolve-a-module-specifier
100 static KURL ResolveModuleSpecifier(const String& module_request, 99 static KURL ResolveModuleSpecifier(const String& module_request,
101 const KURL& base_url); 100 const KURL& base_url);
102 101
103 virtual ScriptModule CompileModule(const String& script, 102 virtual ScriptModule CompileModule(const String& script,
104 const String& url_str, 103 const String& url_str,
105 AccessControlStatus) = 0; 104 AccessControlStatus) = 0;
106 105
(...skipping 13 matching lines...) Expand all
120 // if the cached entry doesn't exist. 119 // if the cached entry doesn't exist.
121 // The client can be notified either synchronously or asynchronously. 120 // The client can be notified either synchronously or asynchronously.
122 virtual void FetchNewSingleModule(const ModuleScriptFetchRequest&, 121 virtual void FetchNewSingleModule(const ModuleScriptFetchRequest&,
123 ModuleGraphLevel, 122 ModuleGraphLevel,
124 ModuleScriptLoaderClient*) = 0; 123 ModuleScriptLoaderClient*) = 0;
125 }; 124 };
126 125
127 } // namespace blink 126 } // namespace blink
128 127
129 #endif 128 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698