Debian Codegraph @

js/src/jit-test/tests/wasm/js-promise-integration/shutdown.js

raw
1 // Test shutting down the program with suspended stack.
2
3 const suspending = new WebAssembly.Suspending(() => new Promise(() => {}));
4 const ins = wasmEvalText(`(module
5 (import "" "s" (func $imp))
6 (func (export "f")
7 call $imp
8 )
9 )`, {"": {s: suspending,}});
10 const promising = WebAssembly.promising(ins.exports.f);
11 var p = promising();