Skip to content

Commit 0f64be9

Browse files
authored
Editorial: unify term async context mapping (#99)
1 parent eadad3d commit 0f64be9

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

spec.html

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ <h1>
140140
</dl>
141141
<emu-alg>
142142
1. <del>Assert: _finalizationRegistry_ has [[Cells]] and [[CleanupCallback]] internal slots.</del>
143-
1. <ins>Assert: _finalizationRegistry_ has [[Cells]], [[CleanupCallback]], and [[FinalizationRegistryAsyncContextSnapshot]] internal slots.</ins>
143+
1. <ins>Assert: _finalizationRegistry_ has [[Cells]], [[CleanupCallback]], and [[FinalizationRegistryAsyncContextMapping]] internal slots.</ins>
144144
1. Let _callback_ be _finalizationRegistry_.[[CleanupCallback]].
145145
1. While _finalizationRegistry_.[[Cells]] contains a Record _cell_ such that _cell_.[[WeakRefTarget]] is ~empty~, an implementation may perform the following steps:
146146
1. Choose any such _cell_.
147147
1. Remove _cell_ from _finalizationRegistry_.[[Cells]].
148148
1. <del>Perform ? HostCallJobCallback(_callback_, *undefined*, « _cell_.[[HeldValue]] »).</del>
149-
1. <ins>Let _previousContextMapping_ be AsyncContextSwap(_finalizationRegistry_.[[FinalizationRegistryAsyncContextSnapshot]]).</ins>
149+
1. <ins>Let _previousContextMapping_ be AsyncContextSwap(_finalizationRegistry_.[[FinalizationRegistryAsyncContextMapping]]).</ins>
150150
1. <ins>Let _result_ be Completion(HostCallJobCallback(_callback_, *undefined*, « _cell_.[[HeldValue]] »)).</ins>
151151
1. <ins>AsyncContextSwap(_previousContextMapping_).</ins>
152152
1. <ins>Perform ? _result_.</ins>
@@ -316,7 +316,7 @@ <h1>PromiseReaction Records</h1>
316316
</tr>
317317
<tr>
318318
<td>
319-
<ins>[[PromiseAsyncContextSnapshot]]</ins>
319+
<ins>[[PromiseAsyncContextMapping]]</ins>
320320
</td>
321321
<td>
322322
<ins>a List of Async Context Mapping Records</ins>
@@ -377,7 +377,7 @@ <h1>
377377
1. Let _promiseCapability_ be _reaction_.[[Capability]].
378378
1. Let _type_ be _reaction_.[[Type]].
379379
1. Let _handler_ be _reaction_.[[Handler]].
380-
1. <ins>Let _previousContextMapping_ be AsyncContextSwap(_reaction_.[[PromiseAsyncContextSnapshot]]).</ins>
380+
1. <ins>Let _previousContextMapping_ be AsyncContextSwap(_reaction_.[[PromiseAsyncContextMapping]]).</ins>
381381
1. If _handler_ is ~empty~, then
382382
1. If _type_ is ~fulfill~, then
383383
1. let _handlerResult_ be NormalCompletion(_argument_).
@@ -420,10 +420,10 @@ <h1>
420420
<dl class="header">
421421
</dl>
422422
<emu-alg>
423-
1. <ins>Let _snapshot_ be AsyncContextSnapshot().</ins>
424-
1. Let _job_ be a new Job Abstract Closure with no parameters that captures _promiseToResolve_, _thenable_, _then_, <ins>and _snapshot_</ins> and performs the following steps when called:
423+
1. <ins>Let _mapping_ be AsyncContextSnapshot().</ins>
424+
1. Let _job_ be a new Job Abstract Closure with no parameters that captures _promiseToResolve_, _thenable_, _then_, <ins>and _mapping_</ins> and performs the following steps when called:
425425
1. Let _resolvingFunctions_ be CreateResolvingFunctions(_promiseToResolve_).
426-
1. <ins>Let _previousContextMapping_ be AsyncContextSwap(_snapshot_).</ins>
426+
1. <ins>Let _previousContextMapping_ be AsyncContextSwap(_mapping_).</ins>
427427
1. Let _thenCallResult_ be Completion(HostCallJobCallback(_then_, _thenable_, « _resolvingFunctions_.[[Resolve]], _resolvingFunctions_.[[Reject]] »)).
428428
1. If _thenCallResult_ is an abrupt completion, then
429429
1. <del>Return ? Call(_resolvingFunctions_.[[Reject]], *undefined*, « _thenCallResult_.[[Value]] »).</del>
@@ -490,9 +490,9 @@ <h1>
490490
1. Let _onRejectedJobCallback_ be ~empty~.
491491
1. Else,
492492
1. Let _onRejectedJobCallback_ be HostMakeJobCallback(_onRejected_).
493-
1. <ins>Let _snapshot_ be AsyncContextSnapshot().</ins>
494-
1. Let _fulfillReaction_ be the PromiseReaction Record { [[Capability]]: _resultCapability_, [[Type]]: ~fulfill~, [[Handler]]: _onFulfilledJobCallback_, <ins>[[PromiseAsyncContextSnapshot]]: _snapshot_</ins> }.
495-
1. Let _rejectReaction_ be the PromiseReaction Record { [[Capability]]: _resultCapability_, [[Type]]: ~reject~, [[Handler]]: _onRejectedJobCallback_, <ins>[[PromiseAsyncContextSnapshot]]: _snapshot_</ins>}.
493+
1. <ins>Let _mapping_ be AsyncContextSnapshot().</ins>
494+
1. Let _fulfillReaction_ be the PromiseReaction Record { [[Capability]]: _resultCapability_, [[Type]]: ~fulfill~, [[Handler]]: _onFulfilledJobCallback_, <ins>[[PromiseAsyncContextMapping]]: _mapping_</ins> }.
495+
1. Let _rejectReaction_ be the PromiseReaction Record { [[Capability]]: _resultCapability_, [[Type]]: ~reject~, [[Handler]]: _onRejectedJobCallback_, <ins>[[PromiseAsyncContextMapping]]: _mapping_</ins>}.
496496
1. If _promise_.[[PromiseState]] is ~pending~, then
497497
1. Append _fulfillReaction_ to _promise_.[[PromiseFulfillReactions]].
498498
1. Append _rejectReaction_ to _promise_.[[PromiseRejectReactions]].
@@ -1063,10 +1063,10 @@ <h1>AsyncContext.Snapshot.wrap ( _fn_ )</h1>
10631063

10641064
<emu-alg>
10651065
1. If IsCallable(_fn_) is *false*, throw a *TypeError* exception.
1066-
1. Let _snapshot_ be AsyncContextSnapshot().
1067-
1. Let _closure_ be a new Abstract Closure with parameters (..._args_) that captures _fn_ and _snapshot_ and performs the following steps when called:
1066+
1. Let _mapping_ be AsyncContextSnapshot().
1067+
1. Let _closure_ be a new Abstract Closure with parameters (..._args_) that captures _fn_ and _mapping_ and performs the following steps when called:
10681068
1. Let _thisArgument_ be the *this* value.
1069-
1. Let _previousContextMapping_ be AsyncContextSwap(_snapshot_).
1069+
1. Let _previousContextMapping_ be AsyncContextSwap(_mapping_).
10701070
1. Let _result_ be Completion(Call(_fn_, _thisArgument_, _args_)).
10711071
1. AsyncContextSwap(_previousContextMapping_).
10721072
1. Return _result_.
@@ -1346,12 +1346,12 @@ <h1>FinalizationRegistry ( _cleanupCallback_ )</h1>
13461346
<emu-alg>
13471347
1. If NewTarget is *undefined*, throw a *TypeError* exception.
13481348
1. If IsCallable(_cleanupCallback_) is *false*, throw a *TypeError* exception.
1349-
1. Let _finalizationRegistry_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%FinalizationRegistry.prototype%"*, « [[Realm]], [[CleanupCallback]], [[Cells]], [[FinalizationRegistryAsyncContextSnapshot]] »).
1349+
1. Let _finalizationRegistry_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%FinalizationRegistry.prototype%"*, « [[Realm]], [[CleanupCallback]], [[Cells]], [[FinalizationRegistryAsyncContextMapping]] »).
13501350
1. Let _fn_ be the active function object.
13511351
1. Set _finalizationRegistry_.[[Realm]] to _fn_.[[Realm]].
13521352
1. Set _finalizationRegistry_.[[CleanupCallback]] to HostMakeJobCallback(_cleanupCallback_).
13531353
1. Set _finalizationRegistry_.[[Cells]] to a new empty List.
1354-
1. <ins>Set _finalizationRegistry_.[[FinalizationRegistryAsyncContextSnapshot]] to AsyncContextSnapshot().</ins>
1354+
1. <ins>Set _finalizationRegistry_.[[FinalizationRegistryAsyncContextMapping]] to AsyncContextSnapshot().</ins>
13551355
1. Return _finalizationRegistry_.
13561356
</emu-alg>
13571357
</emu-clause>

0 commit comments

Comments
 (0)