Re: What changes to Web Messaging spec are proposed? [Was: Re: Using ArrayBuffer as payload for binary data to/from Web Workers]

On Thu, Jun 2, 2011 at 11:54 AM, Ian Hickson <ian@hixie.ch> wrote:
> On Thu, 2 Jun 2011, ben turner wrote:
>>
>> I interpreted the proposal differently... This is what I envisioned:
>>
>>   var bufferToTransfer = /* make ArrayBuffer */;
>>   var bufferToCopy = /* make ArrayBuffer */;
>>   var worker = /* make Worker */;
>>   var message = { buf1: bufferToTransfer, buf2: bufferToCopy };
>>   worker.postMessage(message, [bufferToTransfer]);
>>
>> We'd keep the structure exactly the same, it's just that when we clone
>> 'message' we compare each object value to one of the ones passed in the
>> transfer array. If the objects match (===) then we'd transfer it rather
>> than copy it.
>>
>> Does that sound like what you were hoping for?
>
> That's fine except for breaking compatibility with the current MessagePort
> model, which is a pretty big problem.

I'll note that Firefox does not support MessagePorts or the ports
argument, so it wouldn't be an backwards incompatible change for us.

I do seem to recall the Chrome does support it though so google would
have to chime in how happy they are about breaking compat here.

I don't know what the status is for Opera and Safari.

/ Jonas

Received on Thursday, 2 June 2011 19:15:06 UTC