Fix new ArrayBuffer(length) for variaous input (#1959)

Currently new ArrayBuffer(length) does not conform to ES2017.
Major JS implementations follow ES2017 for ArrayBuffer(length).

For example, new ArrayBuffer(length) should not throw RangeError
for length = NaN, undefined, negative number, floating point, and so on.

JerryScript-DCO-1.0-Signed-off-by: Sanggyu Lee sg5.lee@samsung.com
This commit is contained in:
Sanggyu Lee
2017-08-16 19:20:41 +09:00
committed by Zidong Jiang
parent af16a3ae1a
commit c1cff3f961
12 changed files with 128 additions and 43 deletions
@@ -15,3 +15,4 @@
var a = new ArrayBuffer(5);
assert(typeof a === 'object');
assert(a.byteLength === 5);