Commit 5c40f751 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] Fix redundant reify of error

In its destructor, the ErrorThrower already reifies exceptions and
throws them if an error has been set.

R=mtrofin@chromium.org

Change-Id: I17d7a6d300fe4a5860431f214746d053eaf9f104
Reviewed-on: https://chromium-review.googlesource.com/497467
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45153}
parent f9181033
......@@ -3191,10 +3191,9 @@ bool LazyCompilationOrchestrator::CompileFunction(
deopt_data->set(1, Smi::FromInt(func_index));
code->set_deoptimization_data(*deopt_data);
if (thrower.error()) {
if (!isolate->has_pending_exception()) isolate->Throw(*thrower.Reify());
return false;
}
// If we have a pending error, just return. The ErrorThrower will set the
// pending exception in its destructor.
if (thrower.error()) return false;
DCHECK_EQ(Builtins::kWasmCompileLazy,
Code::cast(compiled_module->code_table()->get(func_index))
......
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