W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

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

From: Jonas Sicking <jonas@sicking.cc>
Date: Thu, 2 Jun 2011 12:14:09 -0700
Message-ID: <BANLkTi=sK37Vik8KyO+c41RoJ7HnpF11ig@mail.gmail.com>
To: Ian Hickson <ian@hixie.ch>
Cc: ben turner <bent.mozilla@gmail.com>, "public-webapps@w3.org" <public-webapps@w3.org>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:19 UTC