Skip to content

Commit ce1b206

Browse files
committed
Editorial: Remove unnecessary undefined type from property descriptor tests
`Is{Accessor,Data,Generic}Descriptor` are never called with `undefined`.
1 parent 6c621d2 commit ce1b206

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

spec.html

+5-6
Original file line numberDiff line numberDiff line change
@@ -4411,13 +4411,12 @@ <h1>The Property Descriptor Specification Type</h1>
44114411
<emu-clause id="sec-isaccessordescriptor" type="abstract operation">
44124412
<h1>
44134413
IsAccessorDescriptor (
4414-
_Desc_: a Property Descriptor or *undefined*,
4414+
_Desc_: a Property Descriptor,
44154415
): a Boolean
44164416
</h1>
44174417
<dl class="header">
44184418
</dl>
44194419
<emu-alg>
4420-
1. If _Desc_ is *undefined*, return *false*.
44214420
1. If _Desc_ has a [[Get]] field, return *true*.
44224421
1. If _Desc_ has a [[Set]] field, return *true*.
44234422
1. Return *false*.
@@ -4427,13 +4426,12 @@ <h1>
44274426
<emu-clause id="sec-isdatadescriptor" type="abstract operation">
44284427
<h1>
44294428
IsDataDescriptor (
4430-
_Desc_: a Property Descriptor or *undefined*,
4429+
_Desc_: a Property Descriptor,
44314430
): a Boolean
44324431
</h1>
44334432
<dl class="header">
44344433
</dl>
44354434
<emu-alg>
4436-
1. If _Desc_ is *undefined*, return *false*.
44374435
1. If _Desc_ has a [[Value]] field, return *true*.
44384436
1. If _Desc_ has a [[Writable]] field, return *true*.
44394437
1. Return *false*.
@@ -4443,13 +4441,12 @@ <h1>
44434441
<emu-clause id="sec-isgenericdescriptor" type="abstract operation">
44444442
<h1>
44454443
IsGenericDescriptor (
4446-
_Desc_: a Property Descriptor or *undefined*,
4444+
_Desc_: a Property Descriptor,
44474445
): a Boolean
44484446
</h1>
44494447
<dl class="header">
44504448
</dl>
44514449
<emu-alg>
4452-
1. If _Desc_ is *undefined*, return *false*.
44534450
1. If IsAccessorDescriptor(_Desc_) is *true*, return *false*.
44544451
1. If IsDataDescriptor(_Desc_) is *true*, return *false*.
44554452
1. Return *true*.
@@ -14079,6 +14076,7 @@ <h1>
1407914076
1. Return ? ArraySetLength(_A_, _Desc_).
1408014077
1. Else if _P_ is an array index, then
1408114078
1. Let _lengthDesc_ be OrdinaryGetOwnProperty(_A_, *"length"*).
14079+
1. Assert: _lengthDesc_ is not *undefined*.
1408214080
1. Assert: IsDataDescriptor(_lengthDesc_) is *true*.
1408314081
1. Assert: _lengthDesc_.[[Configurable]] is *false*.
1408414082
1. Let _length_ be _lengthDesc_.[[Value]].
@@ -14168,6 +14166,7 @@ <h1>
1416814166
1. If SameValueZero(_newLen_, _numberLen_) is *false*, throw a *RangeError* exception.
1416914167
1. Set _newLenDesc_.[[Value]] to _newLen_.
1417014168
1. Let _oldLenDesc_ be OrdinaryGetOwnProperty(_A_, *"length"*).
14169+
1. Assert: _oldLenDesc_ is not *undefined*.
1417114170
1. Assert: IsDataDescriptor(_oldLenDesc_) is *true*.
1417214171
1. Assert: _oldLenDesc_.[[Configurable]] is *false*.
1417314172
1. Let _oldLen_ be _oldLenDesc_.[[Value]].

0 commit comments

Comments
 (0)