Commit 1ab97e90 authored by titzer's avatar titzer Committed by Commit bot

[wasm] Avoid crashing if parsing fails in asm -> wasm.

R=ahaas@chromium.org
LOG=Y
BUG=chromium:575369

Review URL: https://codereview.chromium.org/1577813002

Cr-Commit-Position: refs/heads/master@{#33206}
parent 56579ce4
......@@ -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());
......
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