Bug 241414

Summary: [JSC] Add support for Atomics.waitAsync
Product: WebKit Reporter: Florens Verschelde <florens>
Component: JavaScriptCoreAssignee: Yijia Huang <yijia_huang>
Status: RESOLVED FIXED    
Severity: Normal CC: chi187, jensimmons, orichidsjy, saam, webkit-bug-importer, yijia_huang, ysuzuki
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: All   
OS: All   

Description Florens Verschelde 2022-06-08 06:05:58 PDT
We at StackBlitz are using Atomics.waitAsync (https://github.com/tc39/proposal-atomics-wait-async, apparently stage 3 and shipped in Chromium) on stackblitz.com to power our Node.js-in-the-browser port (called WebContainers).

Firefox doesn't implement Atomics.waitAsync either, but we were able to implement a polyfill using workers-in-workers, something that is not possible in Safari at this time.

The lack of Atomics.waitAsync in WebKit is one of the things stopping us from offering WebContainers to users of Safari and other WebKit-based browsers at this time. (Others include bug 174931, bug 238442, and possibly more we haven't identified yet.)
Comment 1 Florens Verschelde 2022-06-08 11:03:47 PDT
Firefox is currently prototyping:
https://groups.google.com/a/mozilla.org/g/dev-platform/c/Z5TPivxh1Xs
Comment 2 Radar WebKit Bug Importer 2022-06-08 12:10:35 PDT
<rdar://problem/94655073>
Comment 3 Simon Chang 2022-09-01 15:53:51 PDT
Given that this bug is also relevant to the implementation of RegExp lookbehind, please also take time to look at https://bugs.webkit.org/show_bug.cgi?id=174931 which is also needed for a higher priority. It's also noted that Atomics.waitAsync has been shipped in both Chromium and Firefox now.
Comment 4 Yijia Huang 2022-09-26 10:05:37 PDT
*** Bug 245676 has been marked as a duplicate of this bug. ***
Comment 5 Yijia Huang 2022-10-18 11:57:38 PDT
Pull request: https://github.com/WebKit/WebKit/pull/5333
Comment 6 Yijia Huang 2022-10-23 00:17:11 PDT
Pull request: https://github.com/WebKit/WebKit/pull/5683
Comment 7 EWS 2022-11-28 00:13:45 PST
Committed 257061@main (7e3fb31d5987): <https://commits.webkit.org/257061@main>

Reviewed commits have been landed. Closing PR #5333 and removing active labels.