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

Unified Diff: third_party/WebKit/Source/core/dom/ModulatorImpl.cpp

Issue 2839563002: [ES6 modules] Return previous error when an instantiation is reattempt. (Closed)
Patch Set: 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/ModulatorImpl.cpp
diff --git a/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp b/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
index b41d3a4038568b5a5c0940a95339b1d9484e49ce..877b2265fd68f002ffd661bfa746e329c1ab8b10 100644
--- a/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
+++ b/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
@@ -128,6 +128,14 @@ ScriptValue ModulatorImpl::InstantiateModule(ScriptModule script_module) {
return script_module.Instantiate(script_state_.Get());
}
+ScriptValue ModulatorImpl::GetInstantiationError(
+ const ModuleScript* module_script) {
+ ScriptState::Scope scope(script_state_.Get());
+ return ScriptValue(
+ script_state_.Get(),
+ module_script->CreateInstantiationError(script_state_->GetIsolate()));
+}
+
Vector<String> ModulatorImpl::ModuleRequestsFromScriptModule(
ScriptModule script_module) {
ScriptState::Scope scope(script_state_.Get());

Powered by Google App Engine
This is Rietveld 408576698