@@ -99,21 +99,17 @@ contributors: Mark S. Miller, Richard Gibson
99
99
1. Let _numericIndex_ be CanonicalNumericIndexString(_P_).
100
100
1. If _numericIndex_ is not *undefined*, then
101
101
1. If IsValidIntegerIndex(_O_, _numericIndex_) is *false*, return *false*.
102
- 1. <ins>If _Desc_ has an [[Enumerable]] field and _Desc_.[[Enumerable]] is *false*, return *false*.</ins>
103
- 1. <ins>If IsAccessorDescriptor(_Desc_) is *true*, return *false*.</ins>
104
- 1. <ins>If IsImmutableBuffer(_O_.[[ViewedArrayBuffer]]) is *false*, then</ins>
105
- 1. If _Desc_ has a [[Configurable]] field and _Desc_.[[Configurable]] is *false*, return *false*.
106
- 1. <del>If _Desc_ has an [[Enumerable]] field and _Desc_.[[Enumerable]] is *false*, return *false*.</del>
107
- 1. <del>If IsAccessorDescriptor(_Desc_) is *true*, return *false*.</del>
108
- 1. If _Desc_ has a [[Writable]] field and _Desc_.[[Writable]] is *false*, return *false*.
109
- 1. If _Desc_ has a [[Value]] field, perform ? TypedArraySetElement(_O_, _numericIndex_, _Desc_.[[Value]]).
110
- 1. Return *true*.
111
- 1. <ins>Else,</ins>
112
- 1. <ins>If _Desc_ has a [[Configurable]] field and _Desc_.[[Configurable]] is *true*, return *false*.</ins>
113
- 1. <ins>If _Desc_ has a [[Writable]] field and _Desc_.[[Writable]] is *true*, return *false*.</ins>
102
+ 1. <ins>If IsImmutableBuffer(_O_.[[ViewedArrayBuffer]]) is *true*, then</ins>
103
+ 1. <ins>Let _current_ be ! <emu-meta suppress-effects="user-code">_O_.[[GetOwnProperty]](_P_)</emu-meta>.</ins>
104
+ 1. <ins>Assert: _current_.[[Configurable]] and _current_.[[Writable]] are both *false*.</ins>
114
105
1. <ins>NOTE: Attempting to redefine an immutable value always fails, even if the new value would be cast to the current value.</ins>
115
- 1. <ins>If _Desc_ has a [[Value]] field and SameValue(_Desc_.[[Value]], TypedArrayGetElement(_O_, _numericIndex_)) is *false*, return *false*.</ins>
116
- 1. <ins>Return *true*.</ins>
106
+ 1. <ins>Return ValidateAndApplyPropertyDescriptor(_O_, _P_, *false*, _Desc_, _current_).</ins>
107
+ 1. If _Desc_ has a [[Configurable]] field and _Desc_.[[Configurable]] is *false*, return *false*.
108
+ 1. If _Desc_ has an [[Enumerable]] field and _Desc_.[[Enumerable]] is *false*, return *false*.
109
+ 1. If IsAccessorDescriptor(_Desc_) is *true*, return *false*.
110
+ 1. If _Desc_ has a [[Writable]] field and _Desc_.[[Writable]] is *false*, return *false*.
111
+ 1. If _Desc_ has a [[Value]] field, perform ? TypedArraySetElement(_O_, _numericIndex_, _Desc_.[[Value]]).
112
+ 1. Return *true*.
117
113
1. Return ! OrdinaryDefineOwnProperty(_O_, _P_, _Desc_).
118
114
</emu-alg>
119
115
</emu-clause>
0 commit comments