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

Unified Diff: src/asmjs/asm-wasm-builder.cc

Issue 2614563002: [wasm][asm.js] Cancel exception and rethrow on parse failure. (Closed)
Patch Set: fix Created 3 years, 11 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
« no previous file with comments | « src/asmjs/asm-typer.cc ('k') | test/mjsunit/asm/regress-674089.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « src/asmjs/asm-typer.cc ('k') | test/mjsunit/asm/regress-674089.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698