2016-06-06 23:48:09 +02:00
|
|
|
// Copyright (C) 2016 The V8 Project authors. All rights reserved.
|
2015-12-02 18:05:12 +01:00
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
|
|
|
/*---
|
2016-06-06 23:48:09 +02:00
|
|
|
esid: sec-arraybuffer-length
|
2015-12-02 18:05:12 +01:00
|
|
|
description: >
|
2016-06-06 23:48:09 +02:00
|
|
|
Returns an empty instance if length is absent
|
|
|
|
info: |
|
2015-12-02 18:05:12 +01:00
|
|
|
ArrayBuffer( length )
|
|
|
|
|
2016-06-06 23:48:09 +02:00
|
|
|
1. If NewTarget is undefined, throw a TypeError exception.
|
|
|
|
2. Let byteLength be ? ToIndex(length).
|
|
|
|
3. Return ? AllocateArrayBuffer(NewTarget, byteLength).
|
2015-12-02 18:05:12 +01:00
|
|
|
---*/
|
|
|
|
|
2016-06-06 23:48:09 +02:00
|
|
|
var buffer = new ArrayBuffer();
|
|
|
|
|
|
|
|
assert.sameValue(buffer.byteLength, 0);
|