ReviewOS

home-lang/home

WebCore: preserve Blob object-part stringification order

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

Tracks a focused remaining item from #66.

The unchanged packages/runtime/test/test/js/web/fetch/blob.test.ts case new Blob stringifies non-Blob object parts in order still fails in Home. A URL part alone stringifies correctly, but the mixed parts ["a", url, "b"] produce duplicated adjacent content instead of ahttps://example.com/pathb. The pinned Bun control passes.

Port the real upstream Blob part coercion/join behavior and its ownership rules. Do not rewrite the fixture, special-case URL, or weaken the assertion.

Acceptance: the unchanged test passes in Debug and ReleaseFast and neighboring Blob lifetime tests remain green.

10 days ago

Fixed by d25fc0bd. Blob multipart construction now visits parts in source order, stringifies non-Blob wrappers and nested arrays exactly once in place, and retains immediate byte snapshots for buffer/Blob parts. The unchanged main Blob fixture passes 26/26 in Debug and ReleaseFast; blob-array-fast-path passes 11/11, including 10,000 parts, sparse arrays, prototype indexed getters, and mixed parts.

Sign in to comment on this issue.