Skip to content

Commit 3fee6bc

Browse files
Tighten the requirements for host hooks (#31)
1 parent da34edf commit 3fee6bc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

spec.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ <h1>
142142
<p>An implementation of HostMakeJobCallback must conform to the following requirements:</p>
143143
<ul>
144144
<li>It must return a JobCallback Record whose [[Callback]] field is _callback_,</li>
145-
<li><ins>It must return a JobCallback Record whose [[AsyncContextSnapshot]] field is a List of Records with fields [[AsyncContextKey]] (a Symbol) and [[AsyncContextValue]] (an ECMAScript language value).</ins></li>
145+
<li><ins>It must return a JobCallback Record whose [[AsyncContextSnapshot]] field is the result of performing AsyncContextSnapshot().</ins></li>
146146
</ul>
147147
<p>The default implementation of HostMakeJobCallback performs the following steps when called:</p>
148148
<emu-alg>
@@ -168,8 +168,9 @@ <h1>
168168
</dl>
169169
<p>An implementation of HostCallJobCallback must conform to the following requirements:</p>
170170
<ul>
171-
<li><ins>It must perform AsyncContextSwap before and after the call,</ins></li>
172-
<li>It must perform and return the result of Call(_jobCallback_.[[Callback]], _V_, _argumentsList_).</li>
171+
<li><ins>It must perform AsyncContextSwap(_jobCallback_.[[Callback]]) before the call,</ins></li>
172+
<li>It must perform and return the result of Call(_jobCallback_.[[Callback]], _V_, _argumentsList_),</li>
173+
<li><ins>It must perform AsyncContextSwap after the call, with the result of the earlier AsyncContextSwap operation.</ins></li>
173174
</ul>
174175
<p>The default implementation of HostCallJobCallback performs the following steps when called:</p>
175176
<emu-alg>

0 commit comments

Comments
 (0)