Commit 7d86a478 authored by bradnelson's avatar bradnelson Committed by Commit bot

[wasm][asm.js] Don't squish error location because module end not reached.

We recently started emitting an error because a module's validation
doesn't reach the end (due to lack of exports).
This contained a mistake that prevents many most other types
of errors from actually getting out.

Ensuring export errors (or not reaching then end) doesn't clobber
other errors.

TODO(bradnelson): Figure out a way to structure tests so this gets
caught.

BUG=v8:4203
R=gdeepti@chromium.org

Review-Url: https://codereview.chromium.org/2632593002
Cr-Commit-Position: refs/heads/master@{#42301}
parent f6929084
......@@ -123,7 +123,7 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> {
if (HasStackOverflow()) {
return false;
}
if (!typer_finished_) {
if (!typer_finished_ && !typer_failed_) {
typer_->FailWithMessage("Module missing export section.");
typer_failed_ = true;
}
......
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