archives

« Bugzilla Issues Index

#1932 — 22.2.1.4: Remove step 15


22.2.1.4 %TypedArray% ( buffer, byteOffset=0, length=undefined )

Step 15:
If offset + elementSize ≥ bufferByteLength, then throw a RangeError exception.

This step needs to be removed, otherwise zero length Typed Arrays cannot be created. Instead add a new step after 16.b to test newByteLength is >= 0.

test case:
new Int8Array(new ArrayBuffer(0), 0, 0)


fixed in rev19 editor's draft


fixed in rev19