Bug 66713

Summary: postMessage to raises INVALID_STATE_ERR instead of DATA_CLONE_ERR in many cases.
Product: WebKit Reporter: David Levin <levin>
Component: DOMAssignee: David Levin <levin>
Status: RESOLVED FIXED    
Severity: Normal CC: dimich, kbr, oliver
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 65209    
Attachments:
Description Flags
Patch
none
Patch dimich: review+

David Levin
Reported 2011-08-22 14:32:50 PDT
Bring our implementation in alignment with the current spec.
Attachments
Patch (9.70 KB, patch)
2011-08-22 16:37 PDT, David Levin
no flags
Patch (14.28 KB, patch)
2011-08-24 15:49 PDT, David Levin
dimich: review+
David Levin
Comment 1 2011-08-22 16:37:36 PDT
David Levin
Comment 2 2011-08-23 11:55:43 PDT
Comment on attachment 104763 [details] Patch Need to add the new chromium results.
David Levin
Comment 3 2011-08-24 15:49:46 PDT
Dmitry Titov
Comment 4 2011-08-24 16:20:27 PDT
It is a change in behavior. Although likely not a big compat issue, but what do the FF and IE throw in those cases?
David Levin
Comment 5 2011-08-25 11:26:51 PDT
it seems that neither Windows Internet Explorer 10 platform preview 2 edition (WIE10PP2E) nor Firefox nightly implement MessageChannel yet (http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#message-channels). But I did alternate tests. For Firefox, I did something like this: var w = new Worker(location.href); w.postMessage(document); It resulted in a data clone error. (Adding a port argument didn't work because it seems that they don't support this yet.) For WIE10PP2E, var w = new Worker(location.href); w.postMessage("hi", [null]); resulted in invalid state error and var w = new Worker(location.href); w.postMessage(document); resulted in an obscure hresult being returned. So in short FireFox throws a data clone error. WIE10PP2E returns invalid state at the moment but they were released before the spec changed to this. Regardless, these errors should only happen when there is a developer programming error, so I'm pretty doubtful that this will be an error condition that folks are trying to handle.
Dmitry Titov
Comment 6 2011-08-25 11:42:12 PDT
Comment on attachment 105088 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=105088&action=review r=me with a nit. > LayoutTests/ChangeLog:3 > + postMessage to raises INVALID_STATE_ERR instead of DATA_CLONE_ERR in many cases. "to raises" -> "to raise"? > Source/WebCore/ChangeLog:3 > + postMessage to raises INVALID_STATE_ERR instead of DATA_CLONE_ERR in many cases. same as above
David Levin
Comment 7 2011-08-29 10:59:05 PDT
Note You need to log in before you can comment on or make changes to this bug.