-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Spec factoring: allow PerformPromiseThen with no capability #694
Labels
Comments
Isn't this problem exposed in the external |
That sounds like a new feature request; the proper procedure for those is outlined in https://github.com/tc39/ecma262/blob/master/CONTRIBUTING.md#feature-requests |
ljharb
added a commit
to ljharb/ecma262
that referenced
this issue
Mar 21, 2018
ljharb
added a commit
to ljharb/ecma262
that referenced
this issue
Mar 21, 2018
ljharb
added a commit
to ljharb/ecma262
that referenced
this issue
Apr 17, 2018
ljharb
added a commit
to ljharb/ecma262
that referenced
this issue
Apr 20, 2018
ljharb
added a commit
to ljharb/ecma262
that referenced
this issue
Jun 4, 2018
ljharb
added a commit
to ljharb/ecma262
that referenced
this issue
Jul 11, 2018
ljharb
added a commit
to ljharb/ecma262
that referenced
this issue
Aug 9, 2018
ljharb
added a commit
to ljharb/ecma262
that referenced
this issue
Aug 9, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PerformPromiseThen is used often to run some spec code after a promise settles. However, often what's being done is not a promise transform, but instead just some reaction to the promise. So you don't need the promise-returning behavior that
Promise.prototype.then
does.Examples of this are in #692 and in the cancelable promises proposal at two locations: https://tc39.github.io/proposal-cancelable-promises/#sec-canceltoken.race and https://tc39.github.io/proposal-cancelable-promises/#sec-promise.withcanceltoken. In general we've been signaling this by creating a new "throwawayCapability" to pass in. As @littledan pointed out in #692, this is error prone since you need to make sure to mark the throwawayCapability.[[Promise]] as handled.
The ideal solution, in my opinion, would be to make the capability argument to PerformPromiseThen optional. In more detail:
The text was updated successfully, but these errors were encountered: