Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up`new ArrayBuffer()` throws per spec, but not in browsers #292
Comments
obastemur
referenced this issue
Jan 16, 2016
Closed
Fix: new ArrayBuffer(Infinity) should throw RangeError #131
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
zloirock
commented
Jan 16, 2016
|
Duplicate #265 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
|
oops, thanks |
ljharb
closed this
Jan 16, 2016
agarwal-sandeep
referenced this issue
Mar 18, 2016
Merged
Update node-chakracore with nodejs/master changes #40
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ljharb commentedJan 16, 2016
Per Microsoft/ChakraCore#105 (comment) -
new ArrayBuffershould throw aRangeErrorbecauseSameValueZero(ToNumber(undefined), ToLength(NaN))isfalse.However, Safari, Firefox, Chrome, and Edge all return an ArrayBuffer with a
byteLengthof zero (same withnew ArrayBuffer(NaN)andnew ArrayBuffer(undefined).Is it possible that step 4 of https://tc39.github.io/ecma262/#sec-arraybuffer-constructor is web-incompatible, and will need to be changed?