blob: 2867d8360e5a181bc725f8fc75c18d5124a6154e [file] [log] [blame]
// Copyright (C) 2017 Mozilla Corporation. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-get-arraybuffer.prototype.bytelength
description: Throws a TypeError exception when `this` is a SharedArrayBuffer
features: [SharedArrayBuffer]
---*/
var getter = Object.getOwnPropertyDescriptor(
ArrayBuffer.prototype, "byteLength"
).get;
assert.throws(TypeError, function() {
var sab = new SharedArrayBuffer(4);
getter.call(sab);
}, "`this` cannot be a SharedArrayBuffer");