Skip to content

Commit

Permalink
mficarra review
Browse files Browse the repository at this point in the history
  • Loading branch information
syg committed May 12, 2023
1 parent ab564a7 commit a1876f4
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -12007,7 +12007,7 @@ <h1>
<h1>
HostEnqueueTimeoutJob (
_timeoutJob_: a Job Abstract Closure,
_milliseconds_: a non-negative Number,
_milliseconds_: a non-negative finite Number,
): ~unused~
</h1>
<dl class="header">
Expand Down Expand Up @@ -42714,7 +42714,6 @@ <h1>
</dl>
<emu-alg>
1. Assert: The surrounding agent is in the critical section for _WL_.
1. Assert: _waiterRecord_.[[Result]] is either *"ok"* or *"timed-out"*.
1. If _waiterRecord_.[[PromiseCapability]] is ~blocking~, then
1. Wake the agent whose signifier is _waiterRecord_.[[AgentSignifier]] from suspension.
1. NOTE: This causes the agent to resume execution in SuspendThisAgent.
Expand All @@ -42723,9 +42722,11 @@ <h1>
1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « _waiterRecord_.[[Result]] »).
1. Else,
1. Perform EnqueueResolveInAgentJob(_waiterRecord_.[[AgentSignifier]], _waiterRecord_.[[PromiseCapability]], _waiterRecord_.[[Result]]).
1. NOTE: An agent must not access another agent's promise capability in any capacity beyond passing it to the host.
1. Return ~unused~.
</emu-alg>
<emu-note>
<p>An agent must not access another agent's promise capability in any capacity beyond passing it to the host.</p>
</emu-note>
</emu-clause>

<emu-clause id="sec-enqueueresolveinagentjob" type="abstract operation">
Expand Down Expand Up @@ -42771,9 +42772,7 @@ <h1>
1. Else, let _v_ be ? ToInt32(_value_).
1. Let _q_ be ? ToNumber(_timeout_).
1. If _q_ is either *NaN* or *+∞*<sub>𝔽</sub>, let _t_ be +∞; else if _q_ is *-∞*<sub>𝔽</sub>, let _t_ be 0; else let _t_ be max(ℝ(_q_), 0).
1. If _mode_ is ~sync~, then
1. Let _B_ be AgentCanSuspend().
1. If _B_ is *false*, throw a *TypeError* exception.
1. If _mode_ is ~sync~ and AgentCanSuspend() is *false*, throw a *TypeError* exception.
1. Let _block_ be _buffer_.[[ArrayBufferData]].
1. Let _offset_ be _typedArray_.[[ByteOffset]].
1. Let _indexedPosition_ be (_i_ × 4) + _offset_.
Expand Down Expand Up @@ -42834,8 +42833,8 @@ <h1>
1. Let _timeoutJob_ be a new Job Abstract Closure with no parameters that captures _WL_ and _waiterRecord_ and performs the following steps when called:
1. Perform EnterCriticalSection(_WL_).
1. If _WL_.[[Waiters]] contains _waiterRecord_, then
1. Let _now_ be the time value (UTC) identifying the current time.
1. Assert: ℝ(_now_) ≥ _waiterRecord_.[[TimeoutTime]].
1. Let _timeOfJobExecution_ be the time value (UTC) identifying the current time.
1. Assert: ℝ(_timeOfJobExecution_) ≥ _waiterRecord_.[[TimeoutTime]].
1. Set _waiterRecord_.[[Result]] to *"timed-out"*.
1. Perform RemoveWaiter(_WL_, _waiterRecord_).
1. Perform NotifyWaiter(_WL_, _waiterRecord_).
Expand Down

0 comments on commit a1876f4

Please sign in to comment.