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#
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.
Making use of JSPI requires some changes by WebAssembly-based developers (no impact on JavaScript developers). Depending on their toolchain usage a developer will need to modify their code. For Emscripten users, this is likely to be minimal as support for JSPI exists in Emscripten.
1. Control flow integrity. 2. Ensuring that JavaScript programs cannot suspend via JSPI.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
JSPI is part of a standards track effort. We are currently in 'stage 3' of a five stage process. The next stage (4) is when a specification is deemed final.
There have been one or two small changes to the API which have prevented moving to phase 4. The text of the specification is much closer to being final than in previous rounds of the origin trial. However, we would like some time to further bake the revised API.
We anticipate being able to fully ship JSPI before the end of 2025Q2.
None.
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.
Origin trial desktop first | 123 |
Origin trial desktop last | 131 |
Origin trial extension 1 end milestone | 131 |
Origin trial extension 2 end milestone | 133 |
Origin trial extension 3 end milestone | 136 |
DevTrial on desktop | 109 |
Origin trial Android first | 123 |
Origin trial Android last | 131 |
Origin trial WebView first | 123 |
Origin trial WebView last | 131 |
--
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 visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/29cdb43b-2512-4595-806d-c90cbc9d0ce6n%40chromium.org.