| allocation-limit.js |
---
esid: sec-arraybuffer-length
es6id: 24.1.2.1
description: >
Throws a RangeError if requested Data Block is too large.
info: |
ArrayBuffer( length )
...
6. Return AllocateArrayBuffer(NewTarget, byteLength).
6.2.6.1 CreateByteDataBlock(size)
...
2. Let db be a new Data Block value consisting of size bytes. If it is
impossible to create such a Data Block, throw a RangeError exception.
...
--- |
1004 |
- |
| data-allocation-after-object-creation.js |
---
esid: sec-arraybuffer-length
es6id: 24.1.2.1
description: >
The new ArrayBuffer instance is created prior to allocating the Data Block.
info: |
ArrayBuffer( length )
...
6. Return AllocateArrayBuffer(NewTarget, byteLength).
AllocateArrayBuffer( constructor, byteLength )
1. Let obj be OrdinaryCreateFromConstructor(constructor, "%ArrayBufferPrototype%",
«[[ArrayBufferData]], [[ArrayBufferByteLength]]» ).
2. ReturnIfAbrupt(obj).
...
4. Let block be CreateByteDataBlock(byteLength).
5. ReturnIfAbrupt(block).
...
features: [Reflect.construct]
--- |
1112 |
- |
| init-zero.js |
---
esid: sec-arraybuffer-length
es6id: 24.1.1.1
description: All bytes are initialized to zero
info: |
[...]
5. Return ? AllocateArrayBuffer(NewTarget, byteLength).
24.1.1.1 AllocateArrayBuffer
3. Let block be ? CreateByteDataBlock(byteLength).
6.2.6.1 CreateByteDataBlock
1. Assert: size≥0.
2. Let db be a new Data Block value consisting of size bytes. If it is
impossible to create such a Data Block, throw a RangeError exception.
3. Set all of the bytes of db to 0.
4. Return db.
features: [DataView]
--- |
1198 |
- |
| isView |
|
|
- |
| length-is-absent.js |
---
esid: sec-arraybuffer-length
description: >
Returns an empty instance if length is absent
info: |
ArrayBuffer( length )
1. If NewTarget is undefined, throw a TypeError exception.
2. Let byteLength be ? ToIndex(length).
3. Return ? AllocateArrayBuffer(NewTarget, byteLength).
--- |
511 |
- |
| length-is-too-large-throws.js |
---
es6id: 24.1.2.1
esid: sec-arraybuffer-length
description: >
Throws a RangeError if length >= 2 ** 53
info: |
ArrayBuffer( length )
1. If NewTarget is undefined, throw a TypeError exception.
2. Let byteLength be ? ToIndex(length).
ToIndex( value )
1. If value is undefined, then
a. Let index be 0.
2. Else,
a. Let integerIndex be ? ToInteger(value).
b. If integerIndex < 0, throw a RangeError exception.
...
--- |
853 |
- |
| length.js |
---
esid: sec-arraybuffer-constructor
description: >
ArrayBuffer.length is 1.
info: |
ArrayBuffer ( length )
ECMAScript Standard Built-in Objects:
Every built-in function object, including constructors, has a length
property whose value is an integer. Unless otherwise specified, this
value is equal to the largest number of named arguments shown in the
subclause headings for the function description. Optional parameters
(which are indicated with brackets: [ ]) or rest parameters (which
are shown using the form «...name») are not included in the default
argument count.
Unless otherwise specified, the length property of a built-in function
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }.
includes: [propertyHelper.js]
features: [ArrayBuffer]
--- |
1084 |
- |
| name.js |
---
esid: sec-arraybuffer-constructor
description: >
ArrayBuffer.name is "ArrayBuffer".
info: |
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, that is not
identified as an anonymous function has a name property whose value is a
String.
Unless otherwise specified, the name property of a built-in Function object,
if it exists, has the attributes { [[Writable]]: false, [[Enumerable]]:
false, [[Configurable]]: true }.
includes: [propertyHelper.js]
--- |
811 |
- |
| negative-length-throws.js |
---
esid: sec-arraybuffer-length
description: >
Throws a Range Error if length represents an integer < 0
info: |
ArrayBuffer( length )
1. If NewTarget is undefined, throw a TypeError exception.
2. Let byteLength be ? ToIndex(length).
ToIndex( value )
1. If value is undefined, then
a. Let index be 0.
2. Else,
a. Let integerIndex be ? ToInteger(value).
b. If integerIndex < 0, throw a RangeError exception.
...
--- |
799 |
- |
| newtarget-prototype-is-not-object.js |
---
esid: sec-arraybuffer-length
es6id: 24.1.2.1
description: >
[[Prototype]] defaults to %ArrayBufferPrototype% if NewTarget.prototype is not an object.
info: |
ArrayBuffer( length )
ArrayBuffer called with argument length performs the following steps:
...
6. Return AllocateArrayBuffer(NewTarget, byteLength).
AllocateArrayBuffer( constructor, byteLength )
1. Let obj be OrdinaryCreateFromConstructor(constructor, "%ArrayBufferPrototype%",
«[[ArrayBufferData]], [[ArrayBufferByteLength]]» ).
2. ReturnIfAbrupt(obj).
...
features: [Reflect.construct, Symbol]
--- |
2004 |
- |
| prop-desc.js |
---
esid: sec-arraybuffer-constructor
description: >
Property descriptor of ArrayBuffer
info: |
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js]
--- |
705 |
- |
| proto-from-ctor-realm.js |
---
esid: sec-arraybuffer-length
es6id: 24.1.1.1
description: Default [[Prototype]] value derived from realm of the newTarget
info: |
[...]
5. Return ? AllocateArrayBuffer(NewTarget, byteLength).
9.1.14 GetPrototypeFromConstructor
[...]
3. Let proto be ? Get(constructor, "prototype").
4. If Type(proto) is not Object, then
a. Let realm be ? GetFunctionRealm(constructor).
b. Let proto be realm's intrinsic object named intrinsicDefaultProto.
[...]
features: [cross-realm, Reflect]
--- |
884 |
- |
| prototype |
|
|
- |
| prototype-from-newtarget.js |
---
esid: sec-arraybuffer-length
es6id: 24.1.2.1
description: >
The [[Prototype]] internal slot is computed from NewTarget.
info: |
ArrayBuffer( length )
ArrayBuffer called with argument length performs the following steps:
...
6. Return AllocateArrayBuffer(NewTarget, byteLength).
AllocateArrayBuffer( constructor, byteLength )
1. Let obj be OrdinaryCreateFromConstructor(constructor, "%ArrayBufferPrototype%",
«[[ArrayBufferData]], [[ArrayBufferByteLength]]» ).
2. ReturnIfAbrupt(obj).
...
features: [Reflect.construct]
--- |
1206 |
- |
| return-abrupt-from-length-symbol.js |
---
esid: sec-arraybuffer-length
description: >
Throws a TypeError if length is a symbol
info: |
ArrayBuffer( length )
1. If NewTarget is undefined, throw a TypeError exception.
2. Let byteLength be ? ToIndex(length).
...
features: [Symbol]
--- |
517 |
- |
| return-abrupt-from-length.js |
---
esid: sec-arraybuffer-length
description: >
Return abrupt from ToIndex(length)
info: |
ArrayBuffer( length )
1. If NewTarget is undefined, throw a TypeError exception.
2. Let byteLength be ? ToIndex(length).
...
--- |
518 |
- |
| Symbol.species |
|
|
- |
| toindex-length.js |
---
esid: sec-arraybuffer-length
description: >
The `length` parameter is converted to a value numeric index value.
info: |
ArrayBuffer( length )
1. If NewTarget is undefined, throw a TypeError exception.
2. Let byteLength be ? ToIndex(length).
3. Return ? AllocateArrayBuffer(NewTarget, byteLength).
ToIndex( value )
1. If value is undefined, then
a. Let index be 0.
2. Else,
a. Let integerIndex be ? ToInteger(value).
b. If integerIndex < 0, throw a RangeError exception.
c. Let index be ! ToLength(integerIndex).
d. If SameValueZero(integerIndex, index) is false, throw a RangeError exception.
3. Return index.
--- |
2289 |
- |
| undefined-newtarget-throws.js |
---
esid: sec-arraybuffer-length
es6id: 24.1.2.1
description: >
Throws a TypeError if ArrayBuffer is called as a function.
info: |
ArrayBuffer( length )
ArrayBuffer called with argument length performs the following steps:
1. If NewTarget is undefined, throw a TypeError exception.
...
--- |
559 |
- |
| zero-length.js |
---
esid: sec-arraybuffer-length
es6id: 24.1.2.1
description: >
The `length` parameter can be zero.
info: |
ArrayBuffer( length )
...
2. Let numberLength be ToNumber(length).
3. Let byteLength be ToLength(numberLength).
4. ReturnIfAbrupt(byteLength).
5. If SameValueZero(numberLength, byteLength) is false, throw a RangeError exception.
...
--- |
671 |
- |