From 72e160c3215b8b061f32d0c67b12ea885737346d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= Date: Mon, 26 Aug 2024 07:29:24 +0200 Subject: [PATCH] Editorial: OrdinaryDefineOwnProperty can't throw for ordinary objects and arrays `OrdinaryDefineOwnProperty` can return an abrupt completion if either `O.[[GetOwnProperty]]` or `IsExtensible(O)` returns an abrupt completion. When `O` is an ordinary object or an array, neither `O.[[GetOwnProperty]]` nor `IsExtensible(O)` can return an abrupt completion, therefore `OrdinaryDefineOwnProperty` is infallible. --- spec.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/spec.html b/spec.html index 264e39164f..2aa55224f1 100644 --- a/spec.html +++ b/spec.html @@ -12671,14 +12671,14 @@

[[DefineOwnProperty]] ( _P_: a property key, _Desc_: a Property Descriptor, - ): either a normal completion containing a Boolean or a throw completion + ): a Boolean

for
an ordinary object _O_
- 1. Return ? OrdinaryDefineOwnProperty(_O_, _P_, _Desc_). + 1. Return ! OrdinaryDefineOwnProperty(_O_, _P_, _Desc_). @@ -12690,6 +12690,8 @@

): either a normal completion containing a Boolean or a throw completion

+
skip global checks
+
true
1. Let _current_ be ? _O_.[[GetOwnProperty]](_P_). @@ -14092,7 +14094,7 @@

1. Set _succeeded_ to ! OrdinaryDefineOwnProperty(_A_, *"length"*, _lengthDesc_). 1. Assert: _succeeded_ is *true*. 1. Return *true*. - 1. Return ? OrdinaryDefineOwnProperty(_A_, _P_, _Desc_). + 1. Return ! OrdinaryDefineOwnProperty(_A_, _P_, _Desc_).