From 1d7f90e02ad218716125dcf19d7203b01913be4b Mon Sep 17 00:00:00 2001 From: Leonardo Balter Date: Wed, 24 Feb 2016 17:47:12 -0500 Subject: [PATCH] Normative: Remove interoperability between TypedArrays and DataView instances Fixes #411. --- spec.html | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/spec.html b/spec.html index d631646fe8..fb5605ddfa 100644 --- a/spec.html +++ b/spec.html @@ -31046,7 +31046,8 @@

get %TypedArray%.prototype.buffer

1. Let _O_ be the *this* value. 1. If Type(_O_) is not Object, throw a *TypeError* exception. - 1. If _O_ does not have a [[ViewedArrayBuffer]] internal slot, throw a *TypeError* exception. + 1. If _O_ does not have a [[TypedArrayName]] internal slot, throw a *TypeError* exception. + 1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot. 1. Let _buffer_ be the value of _O_'s [[ViewedArrayBuffer]] internal slot. 1. Return _buffer_. @@ -31059,7 +31060,8 @@

get %TypedArray%.prototype.byteLength

1. Let _O_ be the *this* value. 1. If Type(_O_) is not Object, throw a *TypeError* exception. - 1. If _O_ does not have a [[ViewedArrayBuffer]] internal slot, throw a *TypeError* exception. + 1. If _O_ does not have a [[TypedArrayName]] internal slot, throw a *TypeError* exception. + 1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot. 1. Let _buffer_ be the value of _O_'s [[ViewedArrayBuffer]] internal slot. 1. If IsDetachedBuffer(_buffer_) is *true*, return 0. 1. Let _size_ be the value of _O_'s [[ByteLength]] internal slot. @@ -31074,7 +31076,8 @@

get %TypedArray%.prototype.byteOffset

1. Let _O_ be the *this* value. 1. If Type(_O_) is not Object, throw a *TypeError* exception. - 1. If _O_ does not have a [[ViewedArrayBuffer]] internal slot, throw a *TypeError* exception. + 1. If _O_ does not have a [[TypedArrayName]] internal slot, throw a *TypeError* exception. + 1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot. 1. Let _buffer_ be the value of _O_'s [[ViewedArrayBuffer]] internal slot. 1. If IsDetachedBuffer(_buffer_) is *true*, return 0. 1. Let _offset_ be the value of _O_'s [[ByteOffset]] internal slot. @@ -31102,7 +31105,7 @@

Runtime Semantics: ValidateTypedArray ( _O_ )

1. If Type(_O_) is not Object, throw a *TypeError* exception. 1. If _O_ does not have a [[TypedArrayName]] internal slot, throw a *TypeError* exception. - 1. If _O_ does not have a [[ViewedArrayBuffer]] internal slot, throw a *TypeError* exception. + 1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot. 1. Let _buffer_ be the value of _O_'s [[ViewedArrayBuffer]] internal slot. 1. If IsDetachedBuffer(_buffer_) is *true*, throw a *TypeError* exception. 1. Return _buffer_. @@ -33102,6 +33105,7 @@

GetViewValue ( _view_, _requestIndex_, _isLittleEndian_, _type_ )

1. If Type(_view_) is not Object, throw a *TypeError* exception. 1. If _view_ does not have a [[DataView]] internal slot, throw a *TypeError* exception. + 1. Assert: _view_ has a [[ViewedArrayBuffer]] internal slot. 1. Let _numberIndex_ be ? ToNumber(_requestIndex_). 1. Let _getIndex_ be ToInteger(_numberIndex_). 1. If _numberIndex_ ≠ _getIndex_ or _getIndex_ < 0, throw a *RangeError* exception. @@ -33124,6 +33128,7 @@

SetViewValue ( _view_, _requestIndex_, _isLittleEndian_, _type_, _value_ ) 1. If Type(_view_) is not Object, throw a *TypeError* exception. 1. If _view_ does not have a [[DataView]] internal slot, throw a *TypeError* exception. + 1. Assert: _view_ has a [[ViewedArrayBuffer]] internal slot. 1. Let _numberIndex_ be ? ToNumber(_requestIndex_). 1. Let _getIndex_ be ToInteger(_numberIndex_). 1. If _numberIndex_ ≠ _getIndex_ or _getIndex_ < 0, throw a *RangeError* exception. @@ -33202,7 +33207,8 @@

get DataView.prototype.buffer

1. Let _O_ be the *this* value. 1. If Type(_O_) is not Object, throw a *TypeError* exception. - 1. If _O_ does not have a [[ViewedArrayBuffer]] internal slot, throw a *TypeError* exception. + 1. If _O_ does not have a [[DataView]] internal slot, throw a *TypeError* exception. + 1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot. 1. Let _buffer_ be the value of _O_'s [[ViewedArrayBuffer]] internal slot. 1. Return _buffer_. @@ -33215,7 +33221,8 @@

get DataView.prototype.byteLength

1. Let _O_ be the *this* value. 1. If Type(_O_) is not Object, throw a *TypeError* exception. - 1. If _O_ does not have a [[ViewedArrayBuffer]] internal slot, throw a *TypeError* exception. + 1. If _O_ does not have a [[DataView]] internal slot, throw a *TypeError* exception. + 1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot. 1. Let _buffer_ be the value of _O_'s [[ViewedArrayBuffer]] internal slot. 1. If IsDetachedBuffer(_buffer_) is *true*, throw a *TypeError* exception. 1. Let _size_ be the value of _O_'s [[ByteLength]] internal slot. @@ -33230,7 +33237,8 @@

get DataView.prototype.byteOffset

1. Let _O_ be the *this* value. 1. If Type(_O_) is not Object, throw a *TypeError* exception. - 1. If _O_ does not have a [[ViewedArrayBuffer]] internal slot, throw a *TypeError* exception. + 1. If _O_ does not have a [[DataView]] internal slot, throw a *TypeError* exception. + 1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot. 1. Let _buffer_ be the value of _O_'s [[ViewedArrayBuffer]] internal slot. 1. If IsDetachedBuffer(_buffer_) is *true*, throw a *TypeError* exception. 1. Let _offset_ be the value of _O_'s [[ByteOffset]] internal slot.