summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/workers/terminate_tla_crash.js
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/workers/terminate_tla_crash.js')
-rw-r--r--cli/tests/testdata/workers/terminate_tla_crash.js21
1 files changed, 0 insertions, 21 deletions
diff --git a/cli/tests/testdata/workers/terminate_tla_crash.js b/cli/tests/testdata/workers/terminate_tla_crash.js
deleted file mode 100644
index f793b8c8e..000000000
--- a/cli/tests/testdata/workers/terminate_tla_crash.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// Test for https://github.com/denoland/deno/issues/12658
-//
-// If a worker is terminated immediately after construction, and the worker's
-// main module uses top-level await, V8 has a chance to crash.
-//
-// These crashes are so rare in debug mode that I've only seen them once. They
-// happen a lot more often in release mode.
-
-const workerModule = `
- await new Promise(resolve => setTimeout(resolve, 1000));
-`;
-
-// Iterating 10 times to increase the likelihood of triggering the crash, at
-// least in release mode.
-for (let i = 0; i < 10; i++) {
- const worker = new Worker(
- `data:application/javascript;base64,${btoa(workerModule)}`,
- { type: "module" },
- );
- worker.terminate();
-}