Index: src/asmjs/asm-wasm-builder.cc |
diff --git a/src/asmjs/asm-wasm-builder.cc b/src/asmjs/asm-wasm-builder.cc |
index 61214f165c2dd8436dedd76ac6ef8b402203c565..0b60df1837039833406ab6ac2c6e9c97bfb53401 100644 |
--- a/src/asmjs/asm-wasm-builder.cc |
+++ b/src/asmjs/asm-wasm-builder.cc |
@@ -163,6 +163,11 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> { |
info.zone(), decl->fun()->scope()->outer_scope(), FUNCTION_SCOPE); |
info.set_asm_function_scope(new_func_scope); |
if (!Compiler::ParseAndAnalyze(&info)) { |
+ decl->fun()->scope()->outer_scope()->RemoveInnerScope(new_func_scope); |
+ if (isolate_->has_pending_exception()) { |
+ isolate_->clear_pending_exception(); |
+ } |
+ typer_->TriggerParsingError(); |
typer_failed_ = true; |
return; |
} |