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

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

Issue 2838933003: [not-for-commit] kitsune changes + pending kouhei changes (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/ScriptModuleResolverImpl.cpp
diff --git a/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.cpp b/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.cpp
index 297890d7a1fa776b1a23a7381a665b51ffee1240..46dfe9fc81c12fbeff87f7371e7ab4c46e6ffbfd 100644
--- a/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.cpp
@@ -68,21 +68,22 @@ ScriptModule ScriptModuleResolverImpl::Resolve(
// throw resolved module script's instantiation error.
if (module_script->InstantiationState() ==
ModuleInstantiationState::kErrored) {
- // TODO(kouhei): Implement this path once
- // https://codereview.chromium.org/2782403002/ landed.
- NOTIMPLEMENTED();
+ ScriptValue error = modulator_->GetInstantiationError(module_script);
+ exception_state.RethrowV8Exception(error.V8Value());
return ScriptModule();
}
// Step 6. Assert: resolved module script's instantiation state is
// "instantiated" (and thus its module record is not null).
- // TODO(kouhei): Enable below check once once
- // https://codereview.chromium.org/2782403002/ landed.
- // CHECK_EQ(moduleScript->instantiationState(),
- // ModuleInstantiationState::Instantiated);
+ /*
+ CHECK_EQ(module_script->InstantiationState(),
+ ModuleInstantiationState::kInstantiated) << "maybe cycles: " << module_script->BaseURL().GetString() << "referrer module " << referrer_module->BaseURL().GetString();
kouhei (in TOK) 2017/04/26 13:03:44 As discussed in hangout, this assert doesn't hold
+ */
+ ScriptModule record = module_script->Record();
+ CHECK(!record.IsNull());
// Step 7. Return resolved module script's module record.
- return module_script->Record();
+ return record;
}
DEFINE_TRACE(ScriptModuleResolverImpl) {

Powered by Google App Engine
This is Rietveld 408576698