Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9259434c015156e882dd760a0a0355c5c5d9e3c4
https://github.com/WebKit/WebKit/commit/9259434c015156e882dd760a0a0355c5c5d9e3c4
Author: Joseph Griego <[email protected]>
Date: 2023-01-12 (Thu, 12 Jan 2023)
Changed paths:
A LayoutTests/js/Atomics-waitasync-invocable-on-main-thread-expected.txt
A LayoutTests/js/Atomics-waitasync-invocable-on-main-thread.html
M Source/JavaScriptCore/runtime/AtomicsObject.cpp
Log Message:
-----------
[JSC] Atomics.waitAsync should be invocable from the main thread
https://bugs.webkit.org/show_bug.cgi?id=250518
Reviewed by Keith Miller.
According to the current proposed spec [1], async atomic waits are not
restricted to threads with `AgentCanSuspend()`--so, Atomics.waitAsync should not
throw a TypeError for this reason. I've added a (very simple) test to this
effect.
So, we should delay the check for `isAtomicsWaitAllowedOnCurrentThread` until
after we know
the wait is known to be synchronous.
If there's an implementation reason we shouldn't do this, let me know, but I
couldn't find one.
[1] https://tc39.es/proposal-atomics-wait-async/#sec-dowait
* LayoutTests/js/Atomics-waitasync-invocable-on-main-thread-expected.txt: Added.
* LayoutTests/js/Atomics-waitasync-invocable-on-main-thread.html: Added.
* Source/JavaScriptCore/runtime/AtomicsObject.cpp:
(JSC::atomicsWaitImpl):
Canonical link: https://commits.webkit.org/258856@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes