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

On Tue, Jun 21, 2011 at 11:43 PM, Glenn Maynard <glenn@zewt.org> wrote:

> On Wed, Jun 22, 2011 at 1:57 AM, David Levin <levin@chromium.org> wrote:
>
>> 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.
>>
>
> Throwing for unsupported objects will break common, reasonable uses, making
> everyone jump hoops to use transfer.  Not throwing will only break code that
> seriously misuses the API, by listing objects for transfer and then
> continuing to use the object.
>

Code always seriously misuses apis. See Raymond Chen's blog for numerous
examples if you have any doubt (http://blogs.msdn.com/b/oldnewthing/).

Received on Wednesday, 22 June 2011 07:15:15 UTC