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

Unified Diff: third_party/WebKit/Source/core/dom/ModuleScript.h

Issue 2839563002: [ES6 modules] Return previous error when an instantiation is reattempt. (Closed)
Patch Set: comments 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/ModuleScript.h
diff --git a/third_party/WebKit/Source/core/dom/ModuleScript.h b/third_party/WebKit/Source/core/dom/ModuleScript.h
index df85c45c370b07b1eae561bbffb1b69a249b3abe..588cb7f06d7a829be4f61cf4bda195bc28886ee5 100644
--- a/third_party/WebKit/Source/core/dom/ModuleScript.h
+++ b/third_party/WebKit/Source/core/dom/ModuleScript.h
@@ -49,10 +49,6 @@ class CORE_EXPORT ModuleScript final : public Script, public TraceWrapperBase {
return instantiation_state_;
}
- v8::Local<v8::Value> CreateInstantiationError(v8::Isolate* isolate) const {
- return instantiation_error_.NewLocal(isolate);
- }
-
// Implements Step 7.1 of:
// https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-script-graph-fetching-procedure
void SetInstantiationErrorAndClearRecord(ScriptValue error);
@@ -91,6 +87,15 @@ class CORE_EXPORT ModuleScript final : public Script, public TraceWrapperBase {
void RunScript(LocalFrame*, const SecurityOrigin*) const override;
String InlineSourceTextForCSP() const override;
+ friend class ModulatorImpl;
+ friend class ModuleTreeLinkerTestModulator;
+ // Access this func only via ModulatorImpl::GetInstantiationError(),
+ // or via Modulator mocks for unit tests.
+ v8::Local<v8::Value> CreateInstantiationErrorInternal(
+ v8::Isolate* isolate) const {
+ return instantiation_error_.NewLocal(isolate);
+ }
+
// https://html.spec.whatwg.org/multipage/webappapis.html#settings-object
Member<Modulator> settings_object_;

Powered by Google App Engine
This is Rietveld 408576698