W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

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

From: Kenneth Russell <kbr@google.com>
Date: Mon, 12 Sep 2011 19:53:02 -0700
Message-ID: <CAMYvS2cdq5fn1dSQBm056G_o4tv3C-_MEwmcwn48YhRum+ADOg@mail.gmail.com>
To: Ian Hickson <ian@hixie.ch>
Cc: "public-webapps@w3.org" <public-webapps@w3.org>
On Fri, Jun 24, 2011 at 4:27 PM, Kenneth Russell <kbr@google.com> wrote:
> On Fri, Jun 24, 2011 at 3:43 PM, Ian Hickson <ian@hixie.ch> wrote:
>> On Fri, 24 Jun 2011, Kenneth Russell wrote:
>>>
>>> Slightly larger issue. In the typed array spec, views like Float32Array
>>> refer to an ArrayBuffer instance. It's desired to be able to transfer
>>> multiple views of the same ArrayBuffer in the same postMessage call.
>>> Currently, because each Transferable is transferred independently,
>>> transferring the first view will cause the view and underlying
>>> ArrayBuffer to be neutered, so upon encountering the second view, an
>>> exception will be thrown since its ArrayBuffer was already transferred.
>>
>> The views shouldn't be Transferable. Only the buffer should be. The views
>> should continue to have the behaviour you had described before, where they
>> recurse to clone their buffer then just clone the view. Since the buffers
>> would already be transferred (the transfering happens before the cloning),
>> it'll all just work.
>
> Thanks, I think I see how this is supposed to work now. I'll rewrite
> the relevant sections of the typed array spec soon and ping you or
> post again if it looks like there are any other issues.

I apologize for how long this took, but the editor's draft of the
typed array spec has finally been updated with these changes. I found
it a little difficult to specify the desired behavior; please let me
know if you see a better or simpler way.

https://www.khronos.org/registry/typedarray/specs/latest/

-Ken
Received on Tuesday, 13 September 2011 02:53:35 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:47 GMT