Commit 31173f92 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[modules] Make Evaluate deal with errored dependencies.

Apparently it can happen that Blink calls Evaluate on a module that has
errored dependencies.

R=adamk@chromium.org

Bug: v8:1569, chromium:750024
Change-Id: I44b6dde2d5fe5ca25ca2b8c44ede2683d1be944d
Reviewed-on: https://chromium-review.googlesource.com/596055Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47071}
parent 3fe14218
...@@ -20131,7 +20131,10 @@ MaybeHandle<Object> Module::Evaluate(Handle<Module> module, ...@@ -20131,7 +20131,10 @@ MaybeHandle<Object> Module::Evaluate(Handle<Module> module,
ZoneForwardList<Handle<Module>>* stack, ZoneForwardList<Handle<Module>>* stack,
unsigned* dfs_index) { unsigned* dfs_index) {
Isolate* isolate = module->GetIsolate(); Isolate* isolate = module->GetIsolate();
DCHECK_NE(module->status(), kErrored); if (module->status() == kErrored) {
isolate->Throw(module->GetException());
return MaybeHandle<Object>();
}
if (module->status() >= kEvaluating) { if (module->status() >= kEvaluating) {
return isolate->factory()->undefined_value(); return isolate->factory()->undefined_value();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment