Bug 94477 - Update postMessage declaration in MessagePort.idl
Summary: Update postMessage declaration in MessagePort.idl
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: http://www.w3.org/TR/html5/comms.html...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-20 07:04 PDT by Chris Dumez
Modified: 2012-08-20 09:56 PDT (History)
7 users (show)

See Also:


Attachments
Patch (1.76 KB, patch)
2012-08-20 07:07 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2012-08-20 07:04:35 PDT
postMessage() / webkitPostMessage() are defined as follows in MessagePort.idl:
[Custom] void postMessage(in DOMString message, in [Optional] Array messagePorts)
[Custom] void webkitPostMessage(in DOMString message, in [Optional] Array transfer)

According to the spec (http://www.w3.org/TR/html5/comms.html#messageport), the first argument should be of type 'any', not 'DOMString'.
We currently don't notice the issue cause we provide custom implementation for those methods and the custom implementation handles the first argument as being of type 'any'.

We should however update MessagePort.idl to avoid confusion.
Comment 1 Chris Dumez 2012-08-20 07:07:54 PDT
Created attachment 159419 [details]
Patch
Comment 2 Kentaro Hara 2012-08-20 08:49:21 PDT
Comment on attachment 159419 [details]
Patch

The change looks reasonable. DedicatedWorkerContext.idl already uses 'any' for postMessage() and webkitPostMessage().

> We currently don't notice the issue cause we provide custom implementation for those methods and the custom implementation handles the first argument as being of type 'any'.

Note: Code generators do not yet support 'any', so we can use 'any' only for custom implementations. We want to fix it.
Comment 3 WebKit Review Bot 2012-08-20 09:39:26 PDT
Comment on attachment 159419 [details]
Patch

Clearing flags on attachment: 159419

Committed r126040: <http://trac.webkit.org/changeset/126040>
Comment 4 WebKit Review Bot 2012-08-20 09:39:32 PDT
All reviewed patches have been landed.  Closing bug.