-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Don't panic when a worker is closed in the reactions to a wasm o…
…peration. (#12270)
- Loading branch information
Showing
5 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. | ||
|
||
// https:/denoland/deno/issues/12263 | ||
// Test for a panic that happens when a worker is closed in the reactions of a | ||
// WASM async operation. | ||
|
||
new Worker( | ||
new URL("./workers/close_in_wasm_reactions.js", import.meta.url), | ||
{ type: "module" }, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Error: CompileError: WebAssembly.compile(): expected string length @+10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// https:/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(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters