mirror of
				https://github.com/mozilla/gecko-dev.git
				synced 2025-10-31 00:08:07 +02:00 
			
		
		
		
	|  5617e628be [Atomics.waitAsync](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics/waitAsync) creates a promise that can be resolved via Atomics.notify, or after an optional timeout. The timeout is [implemented](https://html.spec.whatwg.org/multipage/webappapis.html#hostenqueuetimeoutjob) using the [HostEnqueueTimeoutJob hook](https://html.spec.whatwg.org/multipage/webappapis.html#hostenqueuetimeoutjob), which queues a global task (not a microtask). This patch adds a new API (DelayedDispatchToEventLoopCallback) accessible by the JS engine that utilized the TimeoutManager for executing the steps outlined in the HostEnqueTimeoutJob. Unlike DispatchToEventCallback, this is currently restricted to only threads which support TimeoutManager (the Main thread and the Workers Thread). This should not be enabled on worklets per the discussion [here](https://phabricator.services.mozilla.com/D212876#inline-1206374). The next patch adds an implementation in worker threads. A later patch in the stack adds an implementation for the shell. Depends on D212875 Differential Revision: https://phabricator.services.mozilla.com/D212876 | ||
|---|---|---|
| .. | ||
| loader | ||
| tests | ||
| moz.build | ||
| Worklet.cpp | ||
| Worklet.h | ||
| WorkletFetchHandler.cpp | ||
| WorkletFetchHandler.h | ||
| WorkletGlobalScope.cpp | ||
| WorkletGlobalScope.h | ||
| WorkletImpl.cpp | ||
| WorkletImpl.h | ||
| WorkletThread.cpp | ||
| WorkletThread.h | ||