diff options
Diffstat (limited to 'dom/promise/tests/test_webassembly_compile_worker_terminate.js')
-rw-r--r-- | dom/promise/tests/test_webassembly_compile_worker_terminate.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/dom/promise/tests/test_webassembly_compile_worker_terminate.js b/dom/promise/tests/test_webassembly_compile_worker_terminate.js new file mode 100644 index 0000000000..5b96c9034b --- /dev/null +++ b/dom/promise/tests/test_webassembly_compile_worker_terminate.js @@ -0,0 +1,13 @@ +const sampleURL = "test_webassembly_compile_sample.wasm"; + +function spawnWork() { + const N = 50; + var arr = []; + for (var i = 0; i < N; i++) { + arr.push(WebAssembly.compileStreaming(fetch(sampleURL))); + } + Promise.all(arr).then(spawnWork); +} + +spawnWork(); +postMessage("ok"); |