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
base: main
Are you sure you want to change the base?
Editorial: OrdinaryCreateFromConstructor has wrong parameter type #3287
Conversation
@tutizaraz can you please confirm that you did not use a LLM (AI) for any part of this PR? |
@ljharb for english grammar only because it is not my native language |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parameter type change LGTM, additional prose is questionable IMO.
_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> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Fixes #3168