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

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

Issue 2839563002: [ES6 modules] Return previous error when an instantiation is reattempt. (Closed)
Patch Set: comments 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ModulatorImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "bindings/core/v8/V8PerContextData.h" 9 #include "bindings/core/v8/V8PerContextData.h"
10 #include "core/CoreExport.h" 10 #include "core/CoreExport.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // https://html.spec.whatwg.org/#resolve-a-module-specifier 95 // https://html.spec.whatwg.org/#resolve-a-module-specifier
96 static KURL ResolveModuleSpecifier(const String& module_request, 96 static KURL ResolveModuleSpecifier(const String& module_request,
97 const KURL& base_url); 97 const KURL& base_url);
98 98
99 virtual ScriptModule CompileModule(const String& script, 99 virtual ScriptModule CompileModule(const String& script,
100 const String& url_str, 100 const String& url_str,
101 AccessControlStatus) = 0; 101 AccessControlStatus) = 0;
102 102
103 virtual ScriptValue InstantiateModule(ScriptModule) = 0; 103 virtual ScriptValue InstantiateModule(ScriptModule) = 0;
104 104
105 virtual ScriptValue GetInstantiationError(const ModuleScript*) = 0;
106
105 virtual Vector<String> ModuleRequestsFromScriptModule(ScriptModule) = 0; 107 virtual Vector<String> ModuleRequestsFromScriptModule(ScriptModule) = 0;
106 108
107 virtual void ExecuteModule(const ModuleScript*) = 0; 109 virtual void ExecuteModule(const ModuleScript*) = 0;
108 110
109 private: 111 private:
110 friend class ModuleMap; 112 friend class ModuleMap;
111 113
112 // Fetches a single module script. 114 // Fetches a single module script.
113 // This is triggered from fetchSingle() implementation (which is in ModuleMap) 115 // This is triggered from fetchSingle() implementation (which is in ModuleMap)
114 // if the cached entry doesn't exist. 116 // if the cached entry doesn't exist.
115 // The client can be notified either synchronously or asynchronously. 117 // The client can be notified either synchronously or asynchronously.
116 virtual void FetchNewSingleModule(const ModuleScriptFetchRequest&, 118 virtual void FetchNewSingleModule(const ModuleScriptFetchRequest&,
117 ModuleGraphLevel, 119 ModuleGraphLevel,
118 ModuleScriptLoaderClient*) = 0; 120 ModuleScriptLoaderClient*) = 0;
119 }; 121 };
120 122
121 } // namespace blink 123 } // namespace blink
122 124
123 #endif 125 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ModulatorImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698