blob: 4fb55facb03b934392d0d499d37bca1ff2125fa2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// |reftest| skip-if(!this.hasOwnProperty('SharedArrayBuffer')) -- SharedArrayBuffer is not enabled unconditionally
// Copyright (C) 2017 Mozilla Corporation. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-arraybuffer.prototype.slice
description: >
Throws a TypeError if `this` is a SharedArrayBuffer
features: [SharedArrayBuffer]
---*/
assert.throws(TypeError, function() {
var sab = new SharedArrayBuffer(0);
ArrayBuffer.prototype.slice.call(sab);
}, "`this` value cannot be a SharedArrayBuffer");
reportCompare(0, 0);
|