[Bug 25302] Blob objects should have a keepalive list of objects

https://www.w3.org/Bugs/Public/show_bug.cgi?id=25302

Glenn Maynard <glenn@zewt.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |glenn@zewt.org

--- Comment #1 from Glenn Maynard <glenn@zewt.org> ---
When a fetch is started, it can effectively slice() the blob it was told to
fetch, and close() its slice when it's done.  This can probably be part of the
logic that prevents fetches from being affected by blob URLs being revoked.  In
pseudocode:

fetch(resource):
    if resource is a blob URL:
        // Get the blob, to isolate us from the user revoking the blob URL.
        resource = getBlobFromUrl(resource)

    try:
        if resource is a blob:
            // We were given either a blob URL or a blob.  Slice the blob,
            // to isolate us from the user closing it.
            resource = resource.slice()
        // do the fetch ...
    finally:
        if resource is a blob:
            // Close the blob we sliced, so we don't prevent the underlying
            // storage from being reclaimed.
            resource.close()

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 9 April 2014 20:29:43 UTC