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

On Mon, 20 Jun 2011, Jonas Sicking wrote:
> 
> If data appears both in the .ports array and the .data property, then 
> people will be tempted to create protocols which only work if the array 
> buffer is transferred, i.e. if the receiver only looks in .ports. I.e. 
> people will likely end up with equally ugly solutions like:
> 
> postMessage('vend-reply', [createClone(arraybuffer)]);

Yeah, that's a very good point.

It really seems like part of the problem here is that ports and 
arrayBuffers are quite different (in that one will always want to be 
transferred, but for the other you might want to sometimes transfer and 
sometimes not).

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 21 June 2011 07:39:56 UTC