1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-29 18:49:07 -05:00
denoland-deno/tests/testdata/workers/close_in_wasm_reactions.js
2024-11-21 01:02:58 +00:00

21 lines
431 B
JavaScript

// https://github.com/denoland/deno/issues/12263
// Test for a panic that happens when a worker is closed in the reactions of a
// Wasm async operation.
// The minimum valid wasm module, plus two additional zero bytes.
const buffer = new Uint8Array([
0x00,
0x61,
0x73,
0x6D,
0x01,
0x00,
0x00,
0x00,
0x00,
0x00,
]);
WebAssembly.compile(buffer).catch((err) => {
console.log("Error:", err);
self.close();
});