Skip to content

ABI: implement exact CommonAbortReason DOMException conversion #194

Description

@chrisbbreuer

Parent: #163, #164, #140, #134

Problem

The shared pinned Home/Bun symbol WebCore__CommonAbortReason__toJS is still pending even though zig-js already has selected-realm DOMException construction with exact name/message/code metadata.

Pinned contract

Bun revision 4982b91e maps the three CommonAbortReason tags as follows:

  • Timeout (1) -> TimeoutError: The operation timed out.
  • UserAbort (2) -> AbortError: The operation was aborted.
  • ConnectionClosed (3) -> AbortError: The connection was closed.

The result must be a fresh DOMException in the requested realm, inherit that realm DOMException prototype, expose the matching legacy code (23 or 20), and publish allocation failure through the existing VM exception boundary.

Acceptance criteria

  • Export the exact shared symbol and enum-width ABI.
  • Preserve selected-realm prototype identity, DOMException/Error classification, exact names/messages/codes, and freshness.
  • Keep an already-pending VM exception intact and avoid allocation/mutation in that state.
  • Add the symbol to the combined private runtime fixture.
  • Refresh Home/Bun inventories, README and ABI docs.
  • Pass the focused runtime fixture and batched ABI audits.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions