Intent to Ship: Promise.try

126 views
Skip to first unread message

Shu-yu Guo

unread,
Jul 2, 2024, 6:25:47 PM (3 days ago) Jul 2
to blink-dev

Contact emails

s...@chromium.org

Explainer

None

Specification

https://tc39.es/proposal-promise-try

Summary

Promise.try is a new static method. `Promise.try(f)` is shorthand for `new Promise(resolve => resolve(f()))`.



Blink component

Blink>JavaScript>Language

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

None. This is a new static method on the Promise constructor.



Gecko: Positive This is a Stage 3 TC39 proposal.

WebKit: Positive (https://bugs.webkit.org/show_bug.cgi?id=275359) This is a Stage 3 TC39 proposal.

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

None



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

Yes

Test262: https://github.com/tc39/test262/tree/main/test/built-ins/Promise/try



Flag name on chrome://flags

--js-promise-try

Finch feature name

kJavaScriptPromiseTry

Requires code in //chrome?

False

Estimated milestones

DevTrial on desktop128
DevTrial on Android128


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6315704705089536?gate=5106880681869312

This intent message was generated by Chrome Platform Status.

Domenic Denicola

unread,
Jul 3, 2024, 12:23:14 AM (3 days ago) Jul 3
to Shu-yu Guo, blink-dev
On Wed, Jul 3, 2024 at 7:25 AM Shu-yu Guo <s...@chromium.org> wrote:

Contact emails

s...@chromium.org

Explainer

None




Specification

https://tc39.es/proposal-promise-try

Summary

Promise.try is a new static method. `Promise.try(f)` is shorthand for `new Promise(resolve => resolve(f()))`.



Blink component

Blink>JavaScript>Language

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

None. This is a new static method on the Promise constructor.



Gecko: Positive This is a Stage 3 TC39 proposal.

WebKit: Positive (https://bugs.webkit.org/show_bug.cgi?id=275359) This is a Stage 3 TC39 proposal.

The repository currently says "stage 2.7", whereas our exceptions for TAG review and a lot of the usual Blink process relies on the proposal being in stage 3.

From what I can tell of https://tc39.es/process-document/ the difference is that stage 3 has sufficient test262 tests? But below you say that the feature is fully tested by test262 tests, so I'm unsure what's holding this back from stage 3.

In practice I suspect this isn't a real problem, but I don't want to LGTM right away until we get a bit more clarity here, and possibly update the relevant Blink process bits.

 
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAN-e9e-DDG5a-Q1d0955b15kS-hSPx91vpHqrdv61yUAiCyarg%40mail.gmail.com.

Shu-yu Guo

unread,
Jul 3, 2024, 10:43:02 AM (2 days ago) Jul 3
to Domenic Denicola, blink-dev
I think the repo is not updated. This received Stage 3 at the June 2024 meeting, but the notes are not yet public.

Philip Jägenstedt

unread,
Jul 3, 2024, 12:00:59 PM (2 days ago) Jul 3
to Shu-yu Guo, Domenic Denicola, blink-dev
Thank you for the explanation, Shu-yu.

LGTM1. I've filed https://github.com/tc39/proposal-promise-try/issues/21 about this being stage 3 so that the repo is updated.

Reply all
Reply to author
Forward
0 new messages