summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/requires-failure.https.any.js
blob: fddf85dbede1a36d4f161b638f19c39f8300ac47 (plain)
1
2
3
4
5
6
7
8
9
10
11
// META: global=window,serviceworker

test(() => {
  // See https://github.com/whatwg/html/issues/5380 for why not `new SharedArrayBuffer()`
  const sab = new WebAssembly.Memory({ shared:true, initial:1, maximum:1 }).buffer;
  const ta = new Int32Array(sab);

  assert_throws_js(TypeError, () => {
    Atomics.wait(ta, 0, 0, 10);
  });
}, `[[CanBlock]] in a ${self.constructor.name}`);