W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2014

Re: Blob URL Origin

From: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 13 May 2014 09:57:47 -0700
Message-ID: <CA+c2ei9Xvv1Avy0DN5zRC1M=xyX9A75+p=CzLfJPaw=b7EFjLw@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, Frederik Braun <fbraun@mozilla.com>, WebApps WG <public-webapps@w3.org>
On Tue, May 13, 2014 at 6:00 AM, Anne van Kesteren <annevk@annevk.nl> wrote:
> On Tue, May 13, 2014 at 10:33 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>> It can't work, given how URL.origin is currently defined...  It's possible
>> that definition should change, though.
>
> We don't want new URL() to take ownership of the Blob object, so
> making new URL() reflect the origin of whoever created the uuid for
> the Blob object seems weird.

Why would it need to "take ownership of the Blob object"? First of
all, the origin of the blob: url is determined by who called
createObjectURL, not who owns the Blob instance. Hence you don't
actually need to touch the Blob instance to figure out the origin, but
rather just inspect the url itself (if we use explicit origin syntax),
or look up the origin in the internal url->Blob table (if we use
implicit origin syntax).

And even if you did somehow need to touch the Blob, the implementation
could just immediately release it before returning from the
constructor.

/ Jonas
Received on Tuesday, 13 May 2014 16:59:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:24 UTC