[webkit-dev] starting implementation of postMessage tranferables

2011-09-22 Thread David Levin
*Summary*: Implementing postMessage with transferable support as
webkitPostMessage.

*Details*:
*Spec*:
http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#posting-messages

This describes window.postMessage and the same is true for Message Ports and
Worker Context. It doesn't mention Array Buffers but that will be mentioned
soon and is in the spec that talks about Array Buffers.

Tracking bug: https://bugs.webkit.org/show_bug.cgi?id=64629

*Plan*:
1. Add webkitPostMessage to all of these places to isolate us from possible
spec changes. It will have the same functionality as postMessage.
2. Add the ability to transfer Message Ports.
3. Add the ability to transfer Array Buffers.

We don't plan to put ifdef's around this as we'll do an implementation for
all ports and js engines and each patch is complete by itself. (Even when
using webkitPostMessage, one has to be careful to verify that the items
being transfered may be transfered. After step 1, the answer is no to
everything.)

I didn't send this earlier because we were doing this in postMessage and it
was in the spec but it would have been good to send out the email even then.

dave
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] starting implementation of postMessage tranferables

2011-09-22 Thread Ian Hickson
On Thu, 22 Sep 2011, David Levin wrote:

 *Summary*: Implementing postMessage with transferable support as
 webkitPostMessage.
 
 *Details*:
 *Spec*:
 http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#posting-messages
 
 This describes window.postMessage and the same is true for Message Ports and
 Worker Context. It doesn't mention Array Buffers but that will be mentioned
 soon and is in the spec that talks about Array Buffers.
 
 Tracking bug: https://bugs.webkit.org/show_bug.cgi?id=64629
 
 *Plan*:
 1. Add webkitPostMessage to all of these places to isolate us from possible
 spec changes. It will have the same functionality as postMessage.
 2. Add the ability to transfer Message Ports.
 3. Add the ability to transfer Array Buffers.

After step 2, webkitPostMessage can be renamed to postMessage quite 
safely. The spec isn't going to change in a way that breaks you.

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] starting implementation of postMessage tranferables

2011-09-22 Thread Oliver Hunt

On Sep 22, 2011, at 7:46 PM, Ian Hickson wrote:

 On Thu, 22 Sep 2011, David Levin wrote:
 
 *Summary*: Implementing postMessage with transferable support as
 webkitPostMessage.
 
 *Details*:
 *Spec*:
 http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#posting-messages
 
 This describes window.postMessage and the same is true for Message Ports and
 Worker Context. It doesn't mention Array Buffers but that will be mentioned
 soon and is in the spec that talks about Array Buffers.
 
 Tracking bug: https://bugs.webkit.org/show_bug.cgi?id=64629
 
 *Plan*:
 1. Add webkitPostMessage to all of these places to isolate us from possible
 spec changes. It will have the same functionality as postMessage.
 2. Add the ability to transfer Message Ports.
 3. Add the ability to transfer Array Buffers.
 
 After step 2, webkitPostMessage can be renamed to postMessage quite 
 safely. The spec isn't going to change in a way that breaks you.

I think we should wait and see -- spec changes have caused issues for us in the 
past (eg. localStorage :-/ )

There is not any substantive harm in prefixing, whereas there can be real 
problems down the road if we don't prefix.

--Oliver

 
 -- 
 Ian Hickson   U+1047E)\._.,--,'``.fL
 http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
 Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] starting implementation of postMessage tranferables

2011-09-22 Thread Ian Hickson
On Thu, 22 Sep 2011, Oliver Hunt wrote:
 
 There is not any substantive harm in prefixing, whereas there can be 
 real problems down the road if we don't prefix.

The harm in prefixing is that people can't use the feature for years after 
it's implemented; q.v. CSS.

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev