Skip to content

Commit

Permalink
[modules] Make Evaluate deal with errored dependencies.
Browse files Browse the repository at this point in the history
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/596055
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47071}
  • Loading branch information
GeorgNeis authored and Commit Bot committed Aug 2, 2017
1 parent 3fe1421 commit 31173f9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/objects.cc
Expand Up @@ -20131,7 +20131,10 @@ MaybeHandle<Object> Module::Evaluate(Handle<Module> module,
ZoneForwardList<Handle<Module>>* stack,
unsigned* dfs_index) {
Isolate* isolate = module->GetIsolate();
DCHECK_NE(module->status(), kErrored);
if (module->status() == kErrored) {
isolate->Throw(module->GetException());
return MaybeHandle<Object>();
}
if (module->status() >= kEvaluating) {
return isolate->factory()->undefined_value();
}
Expand Down

0 comments on commit 31173f9

Please sign in to comment.