From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../tests/wasm/timeout/debug-interrupt-2.js | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 js/src/jit-test/tests/wasm/timeout/debug-interrupt-2.js (limited to 'js/src/jit-test/tests/wasm/timeout/debug-interrupt-2.js') diff --git a/js/src/jit-test/tests/wasm/timeout/debug-interrupt-2.js b/js/src/jit-test/tests/wasm/timeout/debug-interrupt-2.js new file mode 100644 index 0000000000..7c0d16aeae --- /dev/null +++ b/js/src/jit-test/tests/wasm/timeout/debug-interrupt-2.js @@ -0,0 +1,28 @@ +// |jit-test| exitstatus: 6; skip-if: !wasmDebuggingEnabled() + +// Don't include wasm.js in timeout tests: when wasm isn't supported, it will +// quit(0) which will cause the test to fail. + +// Note: this test triggers an interrupt and then iloops in Wasm code. If the +// interrupt fires before the Wasm code is compiled, the test relies on the +// JS interrupt check in onEnterFrame to catch it. Warp/Ion code however can +// elide the combined interrupt/overrecursion check in simple leaf functions. +// Long story short, set the Warp threshold to a non-zero value to prevent +// intermittent timeouts with --ion-eager. +setJitCompilerOption("ion.warmup.trigger", 30); + +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.eval("Debugger(parent).onEnterFrame = function() {};"); +timeout(0.01); +var code = wasmTextToBinary(`(module + (func $f2 + loop $top + br $top + end + ) + (func (export "f1") + call $f2 + ) +)`); +new WebAssembly.Instance(new WebAssembly.Module(code)).exports.f1(); -- cgit v1.2.3