You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the web integration of AsyncContext, web specs will need to create
`AsyncContext.Snapshot` objects from an AsyncContext mapping; and we
expect this to be necessary for other kinds of hosts as well, such as
Node.js.
Currently the spec text does not provide any way to do that other than
manually creating the object and populating its
`[[AsyncContextMapping]]` slot, since the `AsyncContext.Snapshot`
constructor always uses the current mapping. So this patch adds an
abstract operation called `CreateAsyncContextSnapshot` that provides
this capability.
_snapshotMapping_: a List of Async Context Mapping Records
976
+
): either a normal completion containing an AsyncContext.Snapshot object or a throw completion
977
+
</h1>
978
+
<dlclass="header">
979
+
<dt>description</dt>
980
+
<dd>It is used to obtain an AsyncContext.Snapshot object representing the given List of Async Context Mapping Records.</dd>
981
+
</dl>
982
+
<emu-alg>
983
+
1. Let _asyncSnapshot_ be ? OrdinaryCreateFromConstructor(%AsyncContext.Snapshot%, *"%AsyncContext.Snapshot.prototype%"*, « [[AsyncSnapshotMapping]] »).
984
+
1. Set _asyncSnapshot_.[[AsyncSnapshotMapping]] to _snapshotMapping_.
985
+
1. Return _asyncSnapshot_.
986
+
</emu-alg>
987
+
<emu-note>
988
+
<p>This abstract operation is meant for hosts to use, and it is not used in this specification.</p>
0 commit comments