Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CreateAsyncContextSnapshot AO #97

Merged
merged 2 commits into from
Jul 10, 2024

Conversation

andreubotella
Copy link
Member

@andreubotella andreubotella commented Jul 8, 2024

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.

spec.html Outdated Show resolved Hide resolved
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.
@andreubotella andreubotella force-pushed the to-async-context-snapshot-object branch from ef54cca to 2ed4db2 Compare July 9, 2024 15:10
@andreubotella andreubotella changed the title Add ToAsyncContextSnapshotObject AO Add CreateAsyncContextSnapshot AO Jul 9, 2024
@andreubotella andreubotella requested a review from legendecas July 9, 2024 18:03
@andreubotella andreubotella merged commit 3243915 into master Jul 10, 2024
5 checks passed
@andreubotella andreubotella deleted the to-async-context-snapshot-object branch July 10, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants