Intent to experiment - WebAssembly JavaScript Promise Integration (update)

918 views
Skip to first unread message

Francis McCabe

unread,
Jan 5, 2024, 1:25:28 PMJan 5
to blink-dev
This is an update to the previous intent-to-experiment (filled out a few more fields)

Contact emails

f...@chromium.org

Explainer

https://github.com/WebAssembly/js-promise-integration/blob/main/proposals/js-promise-integration/Overview.md

Specification

https://github.com/WebAssembly/js-promise-integration/blob/main/proposals/js-promise-integration/Overview.md

Summary

Stack Switching denotes a technology that allows programs to suspend and resume computation. This is an active area that is part of the WebAssembly standards track. See https://github.com/WebAssembly/stack-switching and https://github.com/WebAssembly/meetings/tree/main/stack. This particular feature refers to the integration between JavaScript Promises and stack switching. This is described in more detail in https://docs.google.com/document/d/16Us-pyte2-9DECJDfGm5tnUpfngJJOc8jbj54HMqE9Y/edit#



Blink component

Blink>JavaScript>WebAssembly

Search tags

stack switchingPromiseJSPI

TAG review

https://github.com/w3ctag/design-reviews/issues/809

TAG review status

Pending

Risks



Interoperability and Compatibility

This spec is backed by a standardization effort. We do not plan to ship the JSPI until it has been standardized by the W3C Wasm WG. However, post standardization, we will depend on all browsers implementing the standard.



Gecko: Positive (https://bugzilla.mozilla.org/show_bug.cgi?id=1850627) Mozilla have started their own imlementation

WebKit: No signal

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?



Goals for experimentation

This specification is getting close to finalization. We would like feedback from a wider audience as to the utility and convenience of using the API.

In addition, we are interested in performance benchmarking in production applications.

Ongoing technical constraints

None.



Debuggability

Developers can piggyback on existing DevTools support for Promises to help with debugging JSPI applications. In particular the existing mechanisms for constructing extended stack traces from so-called Promise chains will also include stack traces from JSPI applications.



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?

No

Flag name on chrome://flags

enable-experimental-webassembly-stack-switching

Finch feature name

None

Non-finch justification

None

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/v8/issues/detail?id=12191&q=owner%3Ame&can=2

Estimated milestones

OriginTrial desktop last130
OriginTrial desktop first122
OriginTrial Android last130
OriginTrial Android first122
OriginTrial webView last130
OriginTrial webView first122


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5674874568704000

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAdKk6BGFseZ6pBO2qEW_xeovVw1_guVq26rcNM1nWY442Y5Ng%40mail.gmail.com Intent to Experiment: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAE65UWD8e57Bd5x3nr63M3QcdPo6TKom%2BVZT%3DvO2Uo4x6th_kA%40mail.gmail.com


This intent message was generated by Chrome Platform Status.

Yoav Weiss (@Shopify)

unread,
Jan 24, 2024, 6:09:32 AMJan 24
to blink-dev, Francis McCabe
On Friday, January 5, 2024 at 7:25:28 PM UTC+1 Francis McCabe wrote:
This is an update to the previous intent-to-experiment (filled out a few more fields)



Summary

Stack Switching denotes a technology that allows programs to suspend and resume computation. This is an active area that is part of the WebAssembly standards track. See https://github.com/WebAssembly/stack-switching and https://github.com/WebAssembly/meetings/tree/main/stack. This particular feature refers to the integration between JavaScript Promises and stack switching. This is described in more detail in https://docs.google.com/document/d/16Us-pyte2-9DECJDfGm5tnUpfngJJOc8jbj54HMqE9Y/edit#



Blink componentBlink>JavaScript>WebAssembly

Search tagsstack switchingPromiseJSPI

TAG reviewhttps://github.com/w3ctag/design-reviews/issues/809

TAG review statusPending

Risks


Interoperability and Compatibility

This spec is backed by a standardization effort. We do not plan to ship the JSPI until it has been standardized by the W3C Wasm WG. However, post standardization, we will depend on all browsers implementing the standard.



Gecko: Positive (https://bugzilla.mozilla.org/show_bug.cgi?id=1850627) Mozilla have started their own imlementation

That doesn't count as a positive signal. Please file for official signals (but that is not blocking for this OT).
 

WebKit: No signal

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?



Goals for experimentation

This specification is getting close to finalization. We would like feedback from a wider audience as to the utility and convenience of using the API.

In addition, we are interested in performance benchmarking in production applications.

Ongoing technical constraints

None.



Debuggability

Developers can piggyback on existing DevTools support for Promises to help with debugging JSPI applications. In particular the existing mechanisms for constructing extended stack traces from so-called Promise chains will also include stack traces from JSPI applications.



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?No

I'm guessing it will be covered by tests, at least eventually?
 


Flag name on chrome://flagsenable-experimental-webassembly-stack-switching

Finch feature nameNone

Non-finch justificationNone

Requires code in //chrome?False

Tracking bughttps://bugs.chromium.org/p/v8/issues/detail?id=12191&q=owner%3Ame&can=2

Estimated milestonesOriginTrial desktop last130OriginTrial desktop first122OriginTrial Android last130OriginTrial Android first122OriginTrial webView last130OriginTrial webView first122

Link to entry on the Chrome Platform Statushttps://chromestatus.com/feature/5674874568704000

Links to previous Intent discussionsIntent to prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAdKk6BGFseZ6pBO2qEW_xeovVw1_guVq26rcNM1nWY442Y5Ng%40mail.gmail.com Intent to Experiment: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAE65UWD8e57Bd5x3nr63M3QcdPo6TKom%2BVZT%3DvO2Uo4x6th_kA%40mail.gmail.com

Rick Byers

unread,
Jan 24, 2024, 10:08:15 AMJan 24
to Yoav Weiss (@Shopify), blink-dev, Francis McCabe
My only OT-blocking concern in the original thread was the "developers: no signals". But that was answered there. Yoav, I think your questions are not OT-blocking, right?

LGTM to experiment.

--
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/a6f6bbfe-498e-4812-9773-f19706db4547n%40chromium.org.

Francis McCabe

unread,
Jan 24, 2024, 1:41:00 PMJan 24
to Yoav Weiss (@Shopify), blink-dev
Does this: https://mozilla.github.io/standards-positions/#wasm-js-promise-integration count as an official positive signal?

Francis

Mike Taylor

unread,
Jan 25, 2024, 1:29:43 PMJan 25
to Francis McCabe, Yoav Weiss (@Shopify), blink-dev

Yep - that is an official positive signal, thanks!

Goals for experimentationThis specification is getting close to finalization. We would like feedback from a wider audience as to the utility and convenience of using the API.


In addition, we are interested in performance benchmarking in production applications.

Ongoing technical constraints

None.



Debuggability

Developers can piggyback on existing DevTools support for Promises to help with debugging JSPI applications. In particular the existing mechanisms for constructing extended stack traces from so-called Promise chains will also include stack traces from JSPI applications.



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?No

I'm guessing it will be covered by tests, at least eventually?
 


Flag name on chrome://flagsenable-experimental-webassembly-stack-switching

Finch feature nameNone

Non-finch justificationNone

Requires code in //chrome?False

Tracking bughttps://bugs.chromium.org/p/v8/issues/detail?id=12191&q=owner%3Ame&can=2

Estimated milestonesOriginTrial desktop last130OriginTrial desktop first122OriginTrial Android last130OriginTrial Android first122OriginTrial webView last130OriginTrial webView first122

Link to entry on the Chrome Platform Statushttps://chromestatus.com/feature/5674874568704000

Links to previous Intent discussionsIntent to prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAdKk6BGFseZ6pBO2qEW_xeovVw1_guVq26rcNM1nWY442Y5Ng%40mail.gmail.com Intent to Experiment: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAE65UWD8e57Bd5x3nr63M3QcdPo6TKom%2BVZT%3DvO2Uo4x6th_kA%40mail.gmail.com


This intent message was generated by Chrome Platform Status.

--
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.

Panos Astithas

unread,
Feb 2, 2024, 4:10:00 PMFeb 2
to Rick Byers, Mike Taylor, Francis McCabe, Yoav Weiss (@Shopify), blink-dev
Hey Rick,

This intent was updated to last between M123-M132 after posting, but before approval. Since it's not clear whether you looked at Chromestatus or the email thread, can you confirm that your approval is indeed for these milestones?

Thanks,
Panos

Rick Byers

unread,
Feb 20, 2024, 1:02:44 PMFeb 20
to Panos Astithas, Mike Taylor, Francis McCabe, Yoav Weiss (@Shopify), blink-dev
Sorry I missed this question! No, I did not notice that the entry was for 10 milestones. Our policy is a maximum of 6 milestones with 3-milestone renewals dependent on showing significant progress towards standardization.Francis, do you want to make this for M123-128 instead then plan to request a renewal after that?

Rick

Francis McCabe

unread,
Feb 20, 2024, 1:14:30 PMFeb 20
to blink-dev, rby...@chromium.org, mike...@chromium.org, Francis McCabe, yoav...@chromium.org, blink-dev, Panos Astithas
I can live with that. However, the bureaucracy is overwhelming. To get an extension, the documentation I saw stated that I have to create a new OT. 

Daniel Bratell

unread,
Mar 2, 2024, 2:20:57 PMMar 2
to Francis McCabe, blink-dev, rby...@chromium.org, mike...@chromium.org, Francis McCabe, yoav...@chromium.org, Panos Astithas

The policy has changed a bit to accept a direct extension, without any breaks, where we previously didn't so it's possible the documentation you saw was outdated. The enforced break was to prevent burn-in that would make it painful to do suitable changes or drop an idea, but it seems that has not been a big problem so the process was tweaked.

/Daniel

Reply all
Reply to author
Forward
0 new messages