Skip to content

Implement DOMFormData private ABI and Blob entries #374

Description

@chrisbbreuer

Parent: #134

Child of #140, #163, and #164. Implement the complete shared DOMFormData family against the engine FormData object rather than a disconnected native placeholder.

Scope

  • DOMFormData__forEach
  • DOMFormData__toQueryString
  • WebCore__DOMFormData__append
  • WebCore__DOMFormData__appendBlob
  • WebCore__DOMFormData__cast_
  • WebCore__DOMFormData__count
  • WebCore__DOMFormData__create
  • WebCore__DOMFormData__createFromURLQuery
  • WebCore__DOMFormData__fromJS
  • WebCore__DOMFormData__toQueryString

Acceptance

  • Use the existing JS FormData object and hidden entry list as the canonical native handle, including JS-constructed instances.
  • Upgrade FormData entries from string-only pairs to exact string or Blob/File values while preserving insertion order and WebIDL string conversion.
  • Replace unpaired surrogates with U+FFFD for native string names, values, and filenames as WebCore does.
  • Parse and serialize application/x-www-form-urlencoded data exactly; serialization omits Blob entries.
  • Preserve duplicate keys, empty names/values, plus-space rules, percent escapes, and UTF-8 behavior.
  • appendBlob must retain an opaque native Blob payload and filename for exact native forEach round-trip without pretending the opaque pointer exposes bytes. JS-originated File values retain identity when no replacement filename is supplied; plain Blob values and explicit filenames create a File over the same bytes, per the current HTML create-an-entry algorithm.
  • Validate canonical handles and VM ownership for cast_/fromJS; reject foreign, stale, exception, and non-FormData cells.
  • Callback bridges must expose borrowed ZigString views for string entries and exact blob pointer/filename/is_blob fields for blob entries.
  • Add focused engine tests and compiled Home/Bun consumer evidence in Debug and ReleaseSafe.
  • Refresh both pinned inventories and concise coverage docs. Root benchmark numbers change only after a new accepted benchmark run.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions