镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Implement FetchHeaders private ABI and native adapters #375

Closed

Description

@chrisbbreuer

Parent: #134

Child of #140, #163, and #164. Implement all 25 pinned WebCore__FetchHeaders__* entries against one exact Headers representation, including standalone native handles and consumer adapters.

Scope

  • Complete the shared create, createFromJS, cast, clone, cloneThis, toJS, ref-lifetime, count, copy, append, put, get, has, remove, isEmpty, and fast-header operations.
  • Implement the pinned UWS, H3, PicoHeaders, and UWS response adapter boundaries from their exact revisioned layouts; do not guess or dereference unvalidated foreign records.
  • Implement createValue/createValueNotJS from the pinned StringPointer/ZigString span contract.

Acceptance

  • JavaScript-created and native-created Headers values share one canonical ordered representation with an unspoofable engine brand.
  • Header names and values follow Fetch validation and normalization, duplicate combination, Set-Cookie separation, insertion ordering, and WebIDL exception behavior.
  • Handles have explicit VM/realm ownership and native lifetime semantics; null, stale, foreign-VM, and exception paths are deterministic.
  • Fast HTTPHeaderName indexes map exactly to the pinned enum and have parity with general get/has/remove operations.
  • copyTo and callback/output strings have documented ownership and remain valid for the consumer-required lifetime.
  • External request/response adapters are covered by exact-layout fixtures and reject unsupported layouts rather than exposing partial behavior.
  • Add focused engine tests plus compiled Home and Bun declaration/runtime fixtures in Debug and ReleaseSafe.
  • Refresh both inventories, concise ABI/API docs, CI, and parent progress. Root benchmark numbers change only after a new accepted benchmark run.

Children

Activity

  1. chrisbbreuer commented on Jul 20, 2026

    @chrisbbreuer
    MemberAuthor

    The initial audit is complete. The 25-symbol family is decomposed into #376 for 21 core lifecycle/buffer exports and #377 for four foreign UWS/H3/Pico adapters. The current JS Headers implementation is list-backed and unbranded; #376 therefore needs an explicit native lifetime/ownership layer before exports are added. The adapter child remains separate because the pinned C++ request/response layouts cannot be safely guessed from opaque pointers.

  2. chrisbbreuer commented on Jul 20, 2026

    @chrisbbreuer
    MemberAuthor

    Core child #376 is complete in 975386e2 + b4a9f717: 21/21 scoped FetchHeaders exports now have exact runtime coverage. Current inventories are Home 397/471 and Bun 389/461. The remaining work in this umbrella is only #377, covering the four foreign Pico/UWS/H3 adapter boundaries.

  3. chrisbbreuer commented on Jul 20, 2026

    @chrisbbreuer
    MemberAuthor

    FetchHeaders is complete: 25/25 pinned symbols are implemented across core #376 and adapters #377. Final counts are Home 401/471 and Bun 393/461, with Home 388/388 and Bun FetchHeaders 25/25 runtime fixtures passing in Debug and ReleaseSafe.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions