ReviewOS

home-lang/home

Port Bun Worker postMessage transfer overloads

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

Tracks Bun corpus position 4231 (js/web/workers/worker-postmessage-transfer.test.ts).

Completed in bab20ca:

  • Resolve string and URL-form Blob object URLs as Worker modules through the shared Blob module stack.
  • Provide a worker-local self with postMessage, onmessage, and DOM-style message listener adapters.
  • Support both postMessage(value, [transfer]) and postMessage(value, { transfer: [...] }) in child-to-parent and parent-to-child directions.
  • Detach transferred ArrayBuffers while preserving cloned bytes.
  • Preserve entangled MessagePort state and queued delivery across transfer.
  • Surface revoked Blob worker URLs with causal module-resolution and worker-execution context.
  • Fix Zig 0.17 optional/error propagation in corpus environment forwarding so the authoritative build graph compiles.
  • Add permanent regression coverage for transfer ownership, Blob URL cleanup, and structured errors.

Verification:

  • Position 4231: 3 passed, 0 failed, 0 todo, 0 unsupported.
  • Positions 4230-4231: 60 passed, 0 failed, 0 todo, 0 unsupported.
  • All focused permanent regressions pass.
10 days ago

Completed and pushed in bab20ca. The upstream transfer-overload file passes 3/3 and permanent Blob Worker lifecycle coverage is green.

Sign in to comment on this issue.