v8/test/mjsunit/regress/regress-821368.js
Eric Holk dfe7eb84e3 Mark neteured ArrayBuffers as not neuterable
Bug: chromium:821368
Change-Id: I4e7032d76a0ac0e291b9dab2f7bcb58ce84827cf
Reviewed-on: https://chromium-review.googlesource.com/963601
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Eric Holk <eholk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51971}
2018-03-15 18:19:32 +00:00

15 lines
427 B
JavaScript

// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
const worker = new Worker("onmessage = function(){}");
const buffer = new ArrayBuffer();
worker.postMessage(buffer, [buffer]);
try {
worker.postMessage(buffer, [buffer]);
} catch (e) {
if (e != "ArrayBuffer could not be transferred") {
throw e;
}
}