Commit f49f834f authored by Thibaud Michaud's avatar Thibaud Michaud Committed by Commit Bot

[wasm] Fix trap handler testing callback

Check directly whether there is runtime support for traps instead of
encoding this in the trap ID. For OOB traps we always use the actual
trap ID, so we always emitted the code that assumes runtime support,
which is not true in some cctests.

R=ahaas@chromium.org

Bug: v8:11587
Change-Id: I29df463561bcfb3452e75b209a70c4f4d9941044
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2797289Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73764}
parent 03f2f686
...@@ -405,7 +405,7 @@ class WasmOutOfLineTrap : public OutOfLineCode { ...@@ -405,7 +405,7 @@ class WasmOutOfLineTrap : public OutOfLineCode {
private: private:
void GenerateCallToTrap(TrapId trap_id) { void GenerateCallToTrap(TrapId trap_id) {
if (trap_id == TrapId::kInvalid) { if (!gen_->wasm_runtime_exception_support()) {
// We cannot test calls to the runtime in cctest/test-run-wasm. // We cannot test calls to the runtime in cctest/test-run-wasm.
// Therefore we emit a call to C here instead of a call to the runtime. // Therefore we emit a call to C here instead of a call to the runtime.
__ CallCFunction(ExternalReference::wasm_call_trap_callback_for_testing(), __ CallCFunction(ExternalReference::wasm_call_trap_callback_for_testing(),
......
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