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: Glenn Maynard <glenn@zewt.org>
Date: Fri, 3 Jun 2011 12:46:27 -0400
Message-ID: <BANLkTikvkm=OE=FADLigewV-296mvc+STg@mail.gmail.com>
To: Dmitry Lomov <dslomov@google.com>
Cc: Jonas Sicking <jonas@sicking.cc>, David Levin <levin@chromium.org>, Kenneth Russell <kbr@google.com>, ben turner <bent.mozilla@gmail.com>, "public-webapps@w3.org" <public-webapps@w3.org>
On Fri, Jun 3, 2011 at 11:12 AM, Dmitry Lomov <dslomov@google.com> wrote:
> a) Recursive transfer lists. Allow arbitrary objects, not only ArrayBuffers,
> to appear in transfer lists.  ArrayBuffers that are under objects in
> transfer lists are transferred, others are cloned.

This again causes the same forwards-compatibility problem.  If you do this:

frame = { video: canvasPixelArrayInstance, histogram: arrayBuffer } }
postMessage({ frame: frame }, { transfer: frame });

and you expect only histogram to be transferred (since that's all that
supports it when you write this code), your code breaks when
CanvasPixelArray later supports it.

> b) Transfer lists + separate transferMessage method. We still equip
> postMessage with transfer lists, these transfer lists list ArrayBuffers, and
> we provide a separate method transferMessage with recursive transfer
> semantics.
> What do people think?

Same problem.

If you want a quicker way to transfer all messages of given types, see
my previous mail: { transfer: ArrayBuffer }.

-- 
Glenn Maynard
Received on Friday, 3 June 2011 16:46:54 GMT

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