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: David Levin <levin@chromium.org>
Date: Tue, 21 Jun 2011 22:57:43 -0700
Message-ID: <BANLkTi=ZdxHOdXWd7984g846nYbCX52uhQ@mail.gmail.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: Jonas Sicking <jonas@sicking.cc>, Ian Hickson <ian@hixie.ch>, Andrew Wilson <atwilson@google.com>, Kenneth Russell <kbr@google.com>, Arthur Barstow <art.barstow@nokia.com>, Dmitry Lomov <dslomov@google.com>, ben turner <bent.mozilla@gmail.com>, "public-webapps@w3.org" <public-webapps@w3.org>, Travis Leithead <Travis.Leithead@microsoft.com>
On Tue, Jun 21, 2011 at 10:48 PM, Glenn Maynard <glenn@zewt.org> wrote:

> On Wed, Jun 22, 2011 at 1:25 AM, David Levin <levin@chromium.org> wrote:
>
>> On Tue, Jun 21, 2011 at 9:27 PM, Glenn Maynard <glenn@zewt.org> wrote:
>>
>>> What happens if an object is included in the second list that doesn't
>>> support transfer?  Ian said that it would throw, but I'm not sure that's
>>> best.
>>>
>>
>> If it doesn't throw, doesn't that introduce the backwards compat issue
>> when something new is supported that wasn't before?
>>
>
> The backwards-compat issue that we've talked about before is when transfer
> happens without opting into it explicitly for each object or type.  For
> example, transferEverythingPossible([A, B]) would cause this problem: if A
> supports transfer when you write the code and B does not, then B gaining
> support a year later might break your code.
>
> I can't think of backwards-compat issues with not throwing.  Can you give
> an example?
>

You just gave it! :)

Let's say the call doesn't throw when given a type B that isn't
transferrable.
Let's also say some later changes the javascript code and uses B after the
postMessage call.
Everything work. No throw is done and B isn't "gutted" because it isn't
transferrable.

Now let's say Firefox supports transferring B, the site breaks because it
was never tested like this, so Firefox has to choose between compatibility
and a supporting transferring B. (Of course, this will be in some sample
that everyone copies :).)

dave
Received on Wednesday, 22 June 2011 05:58:36 GMT

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