Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: OrdinaryDefineOwnProperty can't throw for ordinary objects and arrays #3403

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -12671,14 +12671,14 @@ <h1>
[[DefineOwnProperty]] (
_P_: a property key,
_Desc_: a Property Descriptor,
): either a normal completion containing a Boolean or a throw completion
): a Boolean
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
): a Boolean
): a normal completion containing a Boolean

We don't have tooling to enforce it, but we don't allow internal methods to have mixed signatures.

</h1>
<dl class="header">
<dt>for</dt>
<dd>an ordinary object _O_</dd>
</dl>
<emu-alg>
1. Return ? OrdinaryDefineOwnProperty(_O_, _P_, _Desc_).
1. Return ! OrdinaryDefineOwnProperty(_O_, _P_, _Desc_).
</emu-alg>

<emu-clause id="sec-ordinarydefineownproperty" type="abstract operation">
Expand All @@ -12690,6 +12690,8 @@ <h1>
): either a normal completion containing a Boolean or a throw completion
</h1>
<dl class="header">
<dt>skip global checks</dt>
<dd>true</dd>
</dl>
<emu-alg>
1. Let _current_ be ? <emu-meta effects="user-code">_O_.[[GetOwnProperty]]</emu-meta>(_P_).
Expand Down Expand Up @@ -14092,7 +14094,7 @@ <h1>
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_).
</emu-alg>
</emu-clause>

Expand Down
Loading