Tracks Bun corpus position 4230 (js/web/workers/structuredClone-classes.test.ts).
Completed in 78529f5:
- Export
structuredCloneAdvancedfrombun:internal-for-testing. - Implement default/worker/window realm behavior across transfer and storage modes.
- Detach listed ArrayBuffers while preserving clone bytes.
- Preserve ordinary BunFile metadata and BlockList shared state, while storage/transfer preparation produces empty host-object records.
- Reject non-transferable listed host objects with structured DataCloneError context (
runtimeCode,operation,phase,context,valueType,cause, source stack). - Preserve BunFile metadata through non-enumerable implementation slots.
- Extend permanent structured clone regression coverage.
Verification: position 4230 passes 57/57 with 0 failed, 0 todo, and 0 unsupported; the permanent filtered Zig regression also passes.