Skip to content

Commit

Permalink
Integrate with Atomics.waitAsync
Browse files Browse the repository at this point in the history
Implements HostResolveCrossAgentJob and HostEnqueueTimeoutJob.
  • Loading branch information
syg authored and domenic committed Jun 22, 2023
1 parent 8430871 commit fdf691d
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -2959,7 +2959,9 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li>The <dfn data-x-href="https://tc39.es/ecma262/#sec-hasownproperty">HasOwnProperty</dfn> abstract operation</li>
<li>The <dfn data-x="js-HostCallJobCallback" data-x-href="https://tc39.es/ecma262/#sec-hostcalljobcallback">HostCallJobCallback</dfn> abstract operation</li>
<li>The <dfn data-x="js-HostEnqueueFinalizationRegistryCleanupJob" data-x-href="https://tc39.es/ecma262/#sec-host-cleanup-finalization-registry">HostEnqueueFinalizationRegistryCleanupJob</dfn> abstract operation</li>
<li>The <dfn data-x="js-HostEnqueueGenericJob" data-x-href="https://tc39.es/ecma262/#sec-hostenqueuegenericjob">HostEnqueueGenericJob</dfn> abstract operation</li>
<li>The <dfn data-x="js-HostEnqueuePromiseJob" data-x-href="https://tc39.es/ecma262/#sec-hostenqueuepromisejob">HostEnqueuePromiseJob</dfn> abstract operation</li>
<li>The <dfn data-x="js-HostEnqueueTimeoutJob" data-x-href="https://tc39.es/ecma262/#sec-hostenqueuetimeoutjob">HostEnqueueTimeoutJob</dfn> abstract operation</li>
<li>The <dfn data-x="js-HostEnsureCanAddPrivateElement" data-x-href="https://tc39.es/ecma262/#sec-hostensurecanaddprivateelement">HostEnsureCanAddPrivateElement</dfn> abstract operation</li>
<li>The <dfn data-x="js-HostEnsureCanCompileStrings" data-x-href="https://tc39.es/ecma262/#sec-hostensurecancompilestrings">HostEnsureCanCompileStrings</dfn> abstract operation</li>
<li>The <dfn data-x="js-HostLoadImportedModule" data-x-href="https://tc39.es/proposal-import-attributes/#sec-HostLoadImportedModule">HostLoadImportedModule</dfn> abstract operation</li>
Expand Down Expand Up @@ -3004,6 +3006,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li>The <dfn data-x="js-abstract-equality" data-x-href="https://tc39.es/ecma262/#sec-islooselyequal">IsLooselyEqual</dfn> abstract operation</li>
<li>The <dfn data-x="js-strict-equality" data-x-href="https://tc39.es/ecma262/#sec-isstrictlyequal">IsStrictlyEqual</dfn> abstract operation</li>
<li>The <dfn data-x-href="https://tc39.es/ecma262/#sec-atomics-object"><code>Atomics</code></dfn> object</li>
<li>The <dfn data-x-href="https://tc39.es/ecma262/#sec-atomics.waitasync"><code>Atomics.waitAsync</code></dfn> object</li>
<li>The <dfn data-x-href="https://tc39.es/ecma262/#sec-date-objects"><code>Date</code></dfn> class</li>
<li>The <dfn data-x-href="https://tc39.es/ecma262/#sec-finalization-registry-objects"><code>FinalizationRegistry</code></dfn> class</li>
<li>The <dfn data-x-href="https://tc39.es/ecma262/#sec-regexp-regular-expression-objects"><code>RegExp</code></dfn> class</li>
Expand Down Expand Up @@ -101068,6 +101071,23 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
</li>
</ol>

<h6 id="hostenqueuegenericjob"><dfn>HostEnqueueGenericJob</dfn>(<var>job</var>,
<var>realm</var>)</h6>

<p>JavaScript contains an <span>implementation-defined</span> <span
data-x="js-HostEnqueueGenericJob">HostEnqueueGenericJob</span>(<var>job</var>, <var>realm</var>)
abstract operation to perform generic jobs in a particular realm (e.g., resolve promises resulting
from <code>Atomics.waitAsync</code>). User agents must use the following implementation: <ref
spec=JAVASCRIPT></p>

<ol>
<li><p>Let <var>global</var> be <var>realm</var>'s <span data-x="concept-realm-global">global
object</span>.</p></li>

<li><p><span>Queue a global task</span> on the <span>JavaScript engine task source</span> given
<var>global</var> to perform <var>job</var>().</p></li>
</ol>

<span id="integration-with-the-javascript-job-queue"></span>
<span id="enqueuejob(queuename,-job,-arguments)"></span>
<h6 id="hostenqueuepromisejob"><dfn>HostEnqueuePromiseJob</dfn>(<var>job</var>,
Expand Down Expand Up @@ -101137,6 +101157,27 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
</li>
</ol>

<h6 id="hostenqueuetimeoutjob"><dfn>HostEnqueueTimeoutJob</dfn>(<var>job</var>, <var>realm</var>,
<var>milliseconds</var>)</h6>

<p>JavaScript contains an <span>implementation-defined</span> <span
data-x="js-HostEnqueueTimeoutJob">HostEnqueueTimeoutJob</span>(<var>job</var>,
<var>milliseconds</var>) abstract operation to schedule an operation to be performed after a
timeout. HTML schedules these operations using <span>run steps after a timeout</span>. User agents
must use the following implementation: <ref spec=JAVASCRIPT></p>

<ol>
<li><p>Let <var>global</var> be <var>realm</var>'s <span data-x="concept-realm-global">global
object</span>.</p></li>

<li><p>Let <var>timeoutStep</var> be an algorithm step which <span data-x="queue a global
task">queues a global task</span> on the <span>JavaScript engine task source</span> given
<var>global</var> to perform <var>job</var>().</p></li>

<li><p><span>Run steps after a timeout</span> given <var>global</var>, "<code
data-x="">JavaScript</code>", <var>milliseconds</var>, and <var>timeoutStep</var>.</p></li>
</ol>

<h6 id="hostmakejobcallback"><dfn>HostMakeJobCallback</dfn>(<var>callable</var>)</h6>

<p>JavaScript contains an <span>implementation-defined</span> <span
Expand Down

0 comments on commit fdf691d

Please sign in to comment.