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: Ian Hickson <ian@hixie.ch>
Date: Fri, 24 Jun 2011 22:43:56 +0000 (UTC)
To: Kenneth Russell <kbr@google.com>
cc: "public-webapps@w3.org" <public-webapps@w3.org>
Message-ID: <Pine.LNX.4.64.1106242241500.20871@ps20323.dreamhostps.com>
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.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 24 June 2011 22:44:20 UTC

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