You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
node:worker_threads: implement transfer and clone marker helpers #3159
node:worker_threads should implement transfer/clone marker helpers that affect structured clone behavior: markAsUntransferable, isMarkedAsUntransferable, and markAsUncloneable. Perry currently has no marker implementation.
Node Behavior
On Node v25.9.0, isMarkedAsUntransferable(new ArrayBuffer(8)) is initially false; markAsUntransferable(buffer) returns undefined; and isMarkedAsUntransferable(buffer) becomes true. If the marked buffer is later included in a MessagePort.postMessage(value, [buffer]) transfer list, Node throws a DataCloneError with code 25 and keeps the buffer undetached. markAsUncloneable(object) returns undefined, and posting that object through a port throws a DataCloneError. Primitive inputs are accepted for marking and isMarkedAsUntransferable(primitive) returns false.
Perry Behavior
docs/runtime-parity.md lists markAsUntransferable, isMarkedAsUntransferable, and markAsUncloneable; docs/runtime-parity-gaps.md marks them missing. test-files/test_parity_worker_threads.ts shape-probes these helpers but avoids postMessage side effects. Source search found no manifest/runtime/stdlib entries for the marker helpers or structured-clone marker state.
Suggested PR Cut
Batch this with related issues in: #3307 - node:worker_threads: message channels and clone markers parity cut
Activity
fix(node:worker_threads): MessageChannel ports + transfer/clone marke…