Re: File API "oneTimeOnly" is too poorly defined

On Wed, 28 Mar 2012 10:51:59 +0200, Jonas Sicking <> wrote:
> On Wed, Mar 28, 2012 at 2:17 AM, Anne van Kesteren <>  
> wrote:
>> What does dereferencing mean exactly?
> It means "initiating the load" or some such. Implementation-wise for
> blob URLs it would likely mean going through the blob-url hash table
> to find the underlying Blob object and start a read from it. So if the
> URL is removed from the hash using revokeObjectURL this wouldn't
> affect the load. Likewise for the FileSystem API it would mean that a
> read from the blob has started and so any writes need to be queued
> until after the read is finished.
>> resolves URLs currently and then xhr.send() will fetch the  
>> URL.
> Yup, this is the stuff that needs to be defined. In Gecko we actually
> "dereference" the URL in which means that the caller can call
> revokeObjectURL after the call to but before xhr.send. But
> it's certainly possible to change this so that the URL is dereferenced
> in xhr.send instead.

Given that the start of the fetch algorithm  
is synchronous maybe dereferencing can be defined as part of that. The  
change to XMLHttpRequest that would be needed then is to invoke fetch  
before returning from send(). Not sure how well that would work for other  
contexts such as <img> and 'background-image' though.

Anne van Kesteren

Received on Wednesday, 28 March 2012 10:27:09 UTC