W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2010

Re: Lifetime of Blob URL

From: Arun Ranganathan <aranganathan@mozilla.com>
Date: Tue, 7 Sep 2010 16:08:26 -0700 (PDT)
To: Darin Fisher <darin@chromium.org>
Cc: Jonas Sicking <jonas@sicking.cc>, Jian Li <jianli@chromium.org>, Eric Uhrhane <ericu@google.com>, Dmitry Titov <dimich@chromium.org>, Michael Nordman <michaeln@google.com>, David Levin <levin@google.com>, Adrian Bateman <adrianba@microsoft.com>, Web Applications Working Group WG <public-webapps@w3.org>, Anne van Kesteren <annevk@opera.com>
Message-ID: <841077255.502340.1283900906219.JavaMail.root@cm-mail03.mozilla.org>
OK, thank you Darin :) This alleviates the naming tension. 

FileReader, FileException, and FileError it is, then. 

(Eliminating Blob from the inheritance hierarchy causes the problems Darin mentions below). 

On Mon, Aug 30, 2010 at 10:52 PM, Anne van Kesteren < annevk@opera.com > wrote: 

On Tue, 31 Aug 2010 01:22:45 +0200, Darin Fisher < darin@chromium.org > wrote: 

Another idea (possibly a crazy one) would be to eliminate Blob, and just use File for everything. We could rename BlobBuilder to FileBuilder and have it return a File instead of a Blob. Same goes for Blob.slice(). Of course, 
the File would not necessarily correspond to a real physical file on disk 
for performance reasons. 

Not having Blob at all works for me! 

I gave this some more thought. Here's some issues I came up with: 

1) BlobBuilder -> FileBuilder 

This renaming seems to suggest the creation of a file, which is not the intent at all. 

2) XHR.{asBlob,responseBlob} -> XHR.{asFile,responseFile} 

This renaming seems to suggest the creation of a file, which is not necessary for small responses. 

3) Combine Blob and File into a single File interface 

This merging has the unfortunate side-effect of introducing a "name" property for the result of a 

File.slice() operation. It also means that the result of FileBuilder and XHR.responseFile would 

have a name. 

Considering the above, it seems like there is a place for Blob (or something like it). 

I can see Jonas' points about BlobReader vs. FileReader, and so I'm happy to backpedal and go with 
FileReader, FileException, and FileError, keeping Blob for cases where we don't promise a file. 

Received on Tuesday, 7 September 2010 23:09:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:11 UTC