blob: b61ca11baefd3f5e65233189422d3a59988de2d9 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("Test sending shared WebAssembly.Memory's SharedArrayBuffer via postMessage to a worker with transfer-list and fail.");
if (typeof WebAssembly !== 'undefined') {
window.memory = new WebAssembly.Memory({ initial: 1, maximum: 2, shared: true });
window.worker = new Worker("./resources/webassembly-memory-normal-fail-worker.js");
shouldThrow(`worker.postMessage(memory.buffer, [memory.buffer])`);
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>