Skip to content

Conversation

@ShinWonho
Copy link

@ShinWonho ShinWonho commented Nov 10, 2025

Previously, length and name arguments for CreateBuiltinFunction were missing.
This PR adds them to align with the ECMAScript specification.


Preview | Diff

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

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

This looks good to me. Might be good if someone else takes a look too though, maybe @Ms2ger or @saschanaz?

1. If |ongoingPromise| is not null, then:
1. Let |afterOngoingPromiseCapability| be [=!=] [$NewPromiseCapability$]({{%Promise%}}).
1. Let |onSettled| be [$CreateBuiltinFunction$](|nextSteps|, « »).
1. Let |onSettled| be [$CreateBuiltinFunction$](|nextSteps|, 0, "", « »).
Copy link
Member

Choose a reason for hiding this comment

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

Why is this one 0? It seems elsewhere you default to 1.

Copy link
Author

Choose a reason for hiding this comment

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

This is because fulfillSteps and rejectSteps each take one argument (next and reason, respectively), whereas nextSteps takes none.

@annevk
Copy link
Member

annevk commented Nov 11, 2025

You'll also have to complete https://participate.whatwg.org/agreement.

@ShinWonho
Copy link
Author

You'll also have to complete https://participate.whatwg.org/agreement.

When I try to submit the agreement, I get the error message: "Email is already present in the system". However, it seems that the participant data is still added to individuals.json.

@annevk
Copy link
Member

annevk commented Nov 11, 2025

Oh that's weird, not sure what would have caused that as your email address does appear to be unique.

Copy link
Member

@Ms2ger Ms2ger left a comment

Choose a reason for hiding this comment

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

This seems reasonable. Are the length/name observable for any of the functions that didn't previously have them defined explicitly?

Comment on lines +12365 to 12366
1. Let |F| be <a abstract-op>CreateBuiltinFunction</a>(|steps|, 0, |name|, « », |realm|).
1. Return |F|.
Copy link
Member

Choose a reason for hiding this comment

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

Probably these two steps could be merged now.

Comment on lines +12449 to 12450
1. Let |F| be <a abstract-op>CreateBuiltinFunction</a>(|steps|, 1, |name|, « », |realm|).
1. Return |F|.
Copy link
Member

Choose a reason for hiding this comment

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

Ditto (and this would fix the inconsistent indentation too).

ShinWonho and others added 5 commits November 12, 2025 13:56
Co-authored-by: Ms2ger <Ms2ger@gmail.com>
Co-authored-by: Ms2ger <Ms2ger@gmail.com>
Co-authored-by: Ms2ger <Ms2ger@gmail.com>
Co-authored-by: Ms2ger <Ms2ger@gmail.com>
Co-authored-by: Ms2ger <Ms2ger@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants