While a MessagePorts object is transferred, disentanglement of the old MessagePort object happens on the receiving side (on the "transfer-receiving steps"), not on the sending side.
This means MessagePort objects can be in an intermediate "shipped but not yet disentangled" state - the "has been shipped" flag and the Detached internal slot are both set, but disentanglement didn't happen yet.
Should ports still be able to postMessage(), or run onmessage handlers, while in this state? More generally, should this state be observable at all? (I assuming no, because it would involve the receiving side atomically yoinking the port away from the sending side)
While a
MessagePorts object is transferred, disentanglement of the oldMessagePortobject happens on the receiving side (on the "transfer-receiving steps"), not on the sending side.This means
MessagePortobjects can be in an intermediate "shipped but not yet disentangled" state - the "has been shipped" flag and theDetachedinternal slot are both set, but disentanglement didn't happen yet.Should ports still be able to
postMessage(), or runonmessagehandlers, while in this state? More generally, should this state be observable at all? (I assuming no, because it would involve the receiving side atomically yoinking the port away from the sending side)