On Thu, Nov 17, 2011 at 10:47 PM, Kinuko Yasuda <kin...@chromium.org> wrote:

> I mean the URL would essentially be a weak reference to the backing
> file, but it won't keep the backing file alive.
> (At least in sandboxed cases) the filesystem URLs are more like
> 'public address' and not coupled with any particular Entry instances.
> One can make up a URL just by concatenating strings and then can get
> the Entry from the URL.
>

Right, but we're talking about the non-sandboxed case.

What I'm going to do is: create a set of capabilities upon drag event,
> give the capabilities to the context when it was dropped, and revoke
> the capabilities when the context gets deleted (i.e. the page is
> closed).  The lifetime of the Entry instance object doesn't matter in
> this case; Entry is yet another weak reference to the backing file but
> doesn't mean a live reference or access right.
>

This implies a memory leak, as each time you drag a file into a page, you
permanently (for the lifetime of the document) create a record that the
page is allowed to access that file.  If you drag lots of individual files
into the page, this leak could become nontrivial.  I don't think a design
with inherent memory leaks is a good direction.

-- 
Glenn Maynard

Reply via email to