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

Re: File API "oneTimeOnly" is too poorly defined

From: Glenn Maynard <glenn@zewt.org>
Date: Wed, 28 Mar 2012 18:32:34 -0500
Message-ID: <CABirCh9QkA0yurpX=PHPg49s9kq7FGWEHWWZnDY_fqUWOpPn=A@mail.gmail.com>
To: Jonas Sicking <jonas@sicking.cc>
Cc: public-webapps WG <public-webapps@w3.org>
On Wed, Mar 28, 2012 at 2:19 AM, Jonas Sicking <jonas@sicking.cc> wrote:

> All of this will definitely be a lot of work to specify (and possibly
> implement). But I don't see any other options to get interoperability
> with Blobs and blob-URLs. It's definitely not a problem restricted to
> oneTimeOnly.

Those are separate problems.  Other uses of blob URLs (without oneTimeOnly)
don't have an undefined "dereference" concept to begin with; they just
access the URL directly.  They do have other problems, though.  To take the
first example:

var blob = getBlob();
var url = URL.createObjectURL(blob);
img.src = url;

When you assign img.src, you cause "update the image data" to be invoked.
 That algorithm goes asynchronous in step 5; it then accesses img.src
asynchronously.  This means there's a race condition, depending on whether
the revokeObjectURL call happens before or after the asynchronous fetch.

The same changes needed to fix oneTimeOnly would probably fix most of these
sorts of problems too, though.

Glenn Maynard
Received on Wednesday, 28 March 2012 23:33:03 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:39 UTC