archives

« Bugzilla Issues Index

#1670 — 15.13.6, 15.13.7: TypedArray and DataView objects both use the same internal data property names


TypedArray and DataView objects both have internal data property names [[ViewedArrayBuffer]], [[ByteLength]], and [[ByteOffset]]. But [[ViewedArrayBuffer]] is also used to test for TypedArray resp. DataView object-ness, that means an algorithm which currently only tests for [[ViewedArrayBuffer]] can not differentiate between both kinds of objects.

For example the abstract operation for DataView objects "GetViewValue()" is currently also applicable for TypedArray objects.

Or 15.13.6.3.6 "%TypedArray%.prototype.set(array, offset = 0 )", step 11 is currently undefined because only [[ViewedArrayBuffer]] is tested on the target variable, but if target is a DataView object [[TypedArrayName]] is not present.

Or you can use the DataView constructor to perform (half-)initialisation of TypedArray objects ([[ViewedArrayBuffer]], [[ByteLength]], and [[ByteOffset]] get updated, but [[ArrayLength]] is still 0).


fixed in rev17 editor's draft


fixed in rev17, August 23, 2013 draft