ReviewOS

home-lang/home

Bun parity: implement Blob name accessor and subclass field semantics

#341
Closed chris opened this 10 days ago ·
10 days ago

Upstream gap

After #339 and #340 advance copied corpus position 4112 (js/web/fetch/blob.test.ts), the blob: can set name property #10178 case fails: assigning 10 replaces a previously assigned string name on a plain Blob.

Required parity

  • Plain Blob instances and subclasses without an own name field accept string names and ignore non-string assignments.
  • Object.defineProperty can intentionally replace the inherited accessor.
  • A subclass that declares an own class field can store string | number values normally.
  • File names continue to expose their constructor-provided string.
  • Add focused regression coverage and pass the complete upstream file and queue.

Tracked under #66; exposed after #339 and #340.

10 days ago

Completed in add6ef2.\n\nBlob.prototype.name now follows Bun's configurable string-only accessor behavior while File names and subclass own-field/DefineField semantics remain intact. The TypeScript preparation path now preserves class-field initialization instead of erasing it.\n\nVerified by the focused Blob name/subclass regression and js/web/fetch/blob.test.ts (26 passing).

Sign in to comment on this issue.