This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Currently, the checks specified for MessagePort.postMessage() are different from the checks done in window.postMessage() (as described in section 7.2.4 "Posting messages with message ports"). In particular, step 4 of section 7.2.4 says: If any of the entries in ports are null, if any of the entries in ports are not entangled MessagePort objects, or if any MessagePort object is listed in ports more than once, then throw an INVALID_STATE_ERR exception. The spec for MessagePort.postMessage() does not throw an exception if any of the entries in ports are not entangled (per this thread). We should probably update the spec for window.postMessage() to define the same behavior there as well. Also, as written, the spec now incorrectly lets us send a cloned port multiple times. So code like this would not generate an error: var channel = new MessageChannel(); otherWindow.postMessage("message1", channel.port1); otherWindow.postMessage("message2", channel.port1); // Sent the same port again The current WebKit behavior is to throw an INVALID_STATE_ERR in this case, while still allowing closed ports to be sent, which I believe is the intended behavior based on previous discussions. If this is correct, we should update the spec to prohibit resending cloned ports.
I believe this was fixed a while back in response to an e-mail to this effect.
This bug predates the HTML Working Group Decision Policy. If you are satisfied with the resolution of this bug, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document: http://dev.w3.org/html5/decision-policy/decision-policy.html This bug is now being moved to VERIFIED. Please respond within two weeks. If this bug is not closed, reopened or escalated within two weeks, it may be marked as NoReply and will no longer be considered a pending comment.