W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2012

Re: Transferable and structured clones, was: Re: [FileAPI] Deterministic release of Blob proposal

From: Charles Pritchard <chuck@jumis.com>
Date: Wed, 07 Mar 2012 13:00:55 -0800
Message-ID: <4F57CC87.4000704@jumis.com>
To: Kenneth Russell <kbr@google.com>
CC: Glenn Maynard <glenn@zewt.org>, Arun Ranganathan <aranganathan@mozilla.com>, "public-webapps@w3.org" <public-webapps@w3.org>, Michael Nordman <michaeln@google.com>
On 3/7/12 12:34 PM, Kenneth Russell wrote:
> On Wed, Mar 7, 2012 at 12:02 PM, Charles Pritchard<chuck@jumis.com>  wrote:
>> On Mar 7, 2012, at 11:38 AM, Kenneth Russell<kbr@google.com>  wrote:
>>
>>> I believe that we should fix the immediate problem and add a close()
>>> method to Blob. I'm not in favor of adding a similar method to
>>> ArrayBuffer at this time and therefore not to Transferable. There is a
>>> high-level goal to keep the typed array specification as minimal as
>>> possible, and having Transferable support leak in to the public
>>> methods of the interfaces contradicts that goal.
>> I think there's broad enough consensus amongst vendors to table the discussion about adding close to Transferable.
>>
>> Would you please let me know why ypu believe ArrayBuffer should not have a close method?
>>
>> I would like some clarity here. The Typed Array spec would not be cluttered by the addition of a simple close method.
> It's certainly a matter of opinion -- but while it's only the addition
> of one method, it changes typed arrays' semantics to be much closer to
> manual memory allocation than they currently are. It would be a
> further divergence in behavior from ordinary ECMAScript arrays.
>
> The TC39 working group, I have heard, is incorporating typed arrays
> into the language specification, and for this reason I believe extreme
> care is warranted when adding more functionality to the typed array
> spec. The spec can certainly move forward, but personally I'd like to
> check with TC39 on semantic changes like this one. That's the
> rationale behind my statement above about preferring not to add this
> method at this time.

Searching through the net tells me that this has been a rumor for years.

I agree with taking extreme care -- so let's isolate one more bit of 
information:

Is ArrayBuffer being proposed for TC39 incorporation, or is it only the 
Typed Arrays? The idea here is to alter ArrayBuffer, an object which can 
be neutered via transfer map. It seems a waste to have to create a 
Worker to close down buffer views.

Will TC39 have anything to say about the "neuter" concept and/or Web 
Messaging?


Again, I'm bringing this up for the same practical experience that 
Blob.close() was brought up. I do appreciate that read/write allocation 
is a separate semantic from write-once/read-many allocation.

I certainly don't want to derail the introduction of Typed Array into 
TC39. I don't want to sit back for two years either, while the 
ArrayBuffer object is in limbo.

If necessary, I'll do some of the nasty test work of creating a worker 
simply to destroy buffers, and report back on it.
var worker = new Worker('trash.js');
worker.postMessage(null,[bufferToClose]);
worker.close();
vs.
bufferToClose.close();



-Charles
Received on Wednesday, 7 March 2012 21:01:24 GMT

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