Parent: #134
Implements the coherent async-context call boundary shared by the pinned Home and Bun inventories. This is a child of the private ABI coverage work tracked by #140, #163, and #164.
Scope
AsyncContextFrame__withAsyncContextIfNeeded
Bun__JSValue__isAsyncContextFrame
Bun__JSValue__call
Bake__getAsyncLocalStorage is intentionally out of scope: upstream exposes a separately stored Bake/dev-server ALS instance, not the currently active async-context value captured by these wrappers.
Acceptance
- Add a realm-local active async-context value as a precise traced and relocated GC root.
- Represent an AsyncContextFrame as a branded, non-callable object with strong callback and captured-context edges.
- Return callbacks unchanged when no context is active and avoid double-wrapping existing frames.
- Invoke plain callbacks and wrapped callbacks with exact argument ordering and global-this fallback for an empty receiver.
- Install the captured context for the dynamic extent of the call and restore the prior context before normal return or exception publication.
- Reject invalid/foreign handles without crossing VM ownership boundaries.
- Cover brand, capture, nested restoration, throw restoration, GC retention/relocation, and compiled Home/Bun consumer signatures.
- Refresh generated ABI inventories and coverage documentation, batch Debug/ReleaseSafe verification, then close this issue only after the pushed main commit is green.
Parent: #134
Implements the coherent async-context call boundary shared by the pinned Home and Bun inventories. This is a child of the private ABI coverage work tracked by #140, #163, and #164.
Scope
AsyncContextFrame__withAsyncContextIfNeededBun__JSValue__isAsyncContextFrameBun__JSValue__callBake__getAsyncLocalStorageis intentionally out of scope: upstream exposes a separately stored Bake/dev-server ALS instance, not the currently active async-context value captured by these wrappers.Acceptance