Closed
Bug 773132
Opened 12 years ago
Closed 7 years ago
Implement auto-revoking blob URIs
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
INVALID
People
(Reporter: emk, Unassigned)
References
()
Details
Per latest spec, blob URIs are automatically revoked by default after providing a stable state.
Comment 1•12 years ago
|
||
I'd prefer not using HTML spec's stable state for anything.
Reporter | ||
Comment 2•12 years ago
|
||
Then what should be used?
Comment 3•12 years ago
|
||
I filed https://www.w3.org/Bugs/Public/show_bug.cgi?id=17758.
Looks like there can be also other problems in the spec.
Reporter | ||
Comment 4•12 years ago
|
||
I'm testing auto-revoke blob URI patch and I found it broke img-blobURI-2.html.
https://mxr.mozilla.org/mozilla-central/source/layout/reftests/svg/as-image/img-blobURI-2.html?force=1
I think this is expected because the outer SVG-as-an-image will not even start loading before a stable state (or a microtask checkpoint, it doesn't matter for this problem). But is it acceptable to potentially break existing contents which use blob URIs inside SVG-as-an-image?
Yeah, loading the data-url source will definitely happen asynchronously, which means that the blob-url will be revoked by the time it's supposed to be parsed.
I think that's ok. At least I think it's at least worth trying, defaulting to auto-revoking definitely has a risk that it'll break too much content, but we won't know until we try.
Comment 6•12 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #3)
> I filed https://www.w3.org/Bugs/Public/show_bug.cgi?id=17758.
> Looks like there can be also other problems in the spec.
Olli: I'm not sure your problems with stable state are solved with microtasks -- that's equally vague, if not more so.
Can you look at that bug again? I left a comment for you regarding "await..." versus "present..."
Moreover, there are now *two bugs* that I think legitimately address the problem of autoRevoke:
1. https://www.w3.org/Bugs/Public/show_bug.cgi?id=16953#c8 (and https://www.w3.org/Bugs/Public/show_bug.cgi?id=16953#c11)
2. https://www.w3.org/Bugs/Public/show_bug.cgi?id=17765
I think the above two bugs are the correct bugs with the specification, and NOT the microtask bug. Thoughts?
Comment 7•12 years ago
|
||
Script (event listener etc) can't know what all scripts will run before the next stable state.
Microtask doesn't really have that problem.
I agree, we should definitely use microtasks
Comment 9•12 years ago
|
||
(In reply to Jonas Sicking (:sicking) from comment #8)
> I agree, we should definitely use microtasks
But microtasks aren't a real concept! There's only the "magic words" which are "Perform a microtask checkpoint." That's what this is all about:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=16790
We could:
1. Bolster up the existing stable state requirements.
2. Go back to https://www.w3.org/Bugs/Public/show_bug.cgi?id=16790 and do a better job of defining what a microtask is.
Comment 10•12 years ago
|
||
Microtask is the outermost script execution.
MutationObserver callbacks get called at the end of the microtask or end of task, whichever is first.
Comment 11•12 years ago
|
||
Please don't fragment the discussion: https://www.w3.org/Bugs/Public/show_bug.cgi?id=16790
Reporter | ||
Comment 12•12 years ago
|
||
Also,
var fileurl = URL.createObjectURL(file);
audio.src = fileurl;
failed to load because the resource selection algorithm is awaiting a stable state before reading a src attribute.
http://dev.w3.org/html5/spec/single-page.html#concept-media-load-algorithm
that seems like a bigger problem!
Comment 14•12 years ago
|
||
Masatoshi, please see https://www.w3.org/Bugs/Public/show_bug.cgi?id=17765.
Comment 15•12 years ago
|
||
Auto-revoking Blobs are now harnessed to "post-script cleanup steps."
See: https://www.w3.org/Bugs/Public/show_bug.cgi?id=19554#c4
And in spec., see:
http://www.whatwg.org/specs/web-apps/current-work/#calling-scripts
Updated•11 years ago
|
Keywords: dev-doc-needed
Comment 16•7 years ago
|
||
Autorevoke is not a thing in the latest version of the spec. I'm right? We should close this bug.
Flags: needinfo?(annevk)
Comment 17•7 years ago
|
||
Yup.
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: needinfo?(annevk)
Resolution: --- → INVALID
Updated•7 years ago
|
Keywords: dev-doc-needed
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•