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

Unified Diff: src/wasm/wasm-js.cc

Issue 1577813002: [wasm] Avoid crashing if parsing fails in asm -> wasm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-js.cc
diff --git a/src/wasm/wasm-js.cc b/src/wasm/wasm-js.cc
index 8980d019b534e81103b3543fe07f60b59a81802f..8ca9a78d794353c3116bfdc3423c5a6a9b6b6496 100644
--- a/src/wasm/wasm-js.cc
+++ b/src/wasm/wasm-js.cc
@@ -132,7 +132,10 @@ v8::internal::wasm::WasmModuleIndex* TranslateAsmModule(i::ParseInfo* info) {
info->set_allow_lazy_parsing(false);
info->set_toplevel(true);
- CHECK(i::Compiler::ParseAndAnalyze(info));
+ if (!i::Compiler::ParseAndAnalyze(info)) {
+ return nullptr;
+ }
+
info->set_literal(
info->scope()->declarations()->at(0)->AsFunctionDeclaration()->fun());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698