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#
In order to support responsive applications written using WebAssembly it is necessary to provide functionality that allows WebAssembly programs to be suspended and resumed. The primary initial use case is to allow WebAssembly programs whose source relies on synchronous APIs to use asynchronous APIs that are increasingly common on the Web platform. The Promise integration proposal allows this to be done without changing the WebAssembly specification itself and without allowing JavaScript programs to be suspended (other than via existing async mechanisms).
There is a potential that JavaScript applications could attempt to use this API to introduce behaviors not governed by the ecmascript standard. However, the API is designed to mitigate this risk by causing such JavaScript programs to fail to execute (i.e., throw exceptions in such a way as to prevent their use of the API).
There does not appear to be any specific existing API that would be impacted by this proposal.
No milestones specified