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: OrdinaryCreateFromConstructor has wrong parameter type #3287

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
4 changes: 2 additions & 2 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -12976,14 +12976,14 @@ <h1>
<emu-clause id="sec-ordinarycreatefromconstructor" type="abstract operation">
<h1>
OrdinaryCreateFromConstructor (
_constructor_: a constructor,
_constructor_: a function object,
ljharb marked this conversation as resolved.
Show resolved Hide resolved
_intrinsicDefaultProto_: a String,
optional _internalSlotsList_: a List of names of internal slots,
): either a normal completion containing an Object or a throw completion
</h1>
<dl class="header">
<dt>description</dt>
<dd>It creates an ordinary object whose [[Prototype]] value is retrieved from a constructor's *"prototype"* property, if it exists. Otherwise the intrinsic named by _intrinsicDefaultProto_ is used for [[Prototype]]. _internalSlotsList_ contains the names of additional internal slots that must be defined as part of the object. If _internalSlotsList_ is not provided, a new empty List is used.</dd>
<dd>It creates an ordinary object whose [[Prototype]] value is retrieved from a function object's *"prototype"* property, if it exists. This object is referred to by _constructor_, which can be any function object. If the *"prototype"* property does not exist or _constructor_ is not a traditional constructor, the intrinsic named by _intrinsicDefaultProto_ is used for [[Prototype]]. _internalSlotsList_ contains the names of additional internal slots that must be defined as part of the object. If _internalSlotsList_ is not provided, a new empty List is used.</dd>
Copy link
Member

Choose a reason for hiding this comment

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

"traditional constructor" is not a defined term - either it's a constructor, or it isn't. This also isn't relevant here, the non-constructor cases do have a prototype property so intrinsicDefaultProto is not necessarily used for those.

Copy link
Author

Choose a reason for hiding this comment

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

then do we need to revert the changes back to what it was?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I think the original description is fine.

</dl>
<emu-alg>
1. Assert: _intrinsicDefaultProto_ is this specification's name of an intrinsic object. The corresponding object must be an intrinsic that is intended to be used as the [[Prototype]] value of an object.
Expand Down
Loading