tc39/proposal-arraybuffer-base64

Consistently use either TypedArrayLength or TypedArrayByteLength

anba opened this issue · 0 comments

anba commented

Uint8Array.prototype.setFrom{Base64, Hex} call TypedArrayByteLength, whereas GetUint8ArrayBytes uses TypedArrayLength. This should be made consistent.

I think I'd prefer TypedArrayLength, because TypedArrayByteLength is defined in terms of TypedArrayLength and because calling TypedArrayLength makes it more obvious that detached buffers are disallowed.