Closed Bug 1513647 Opened 7 years ago Closed 7 years ago

Fetch doesn't configure MutableBlobStorage to use temporary files

Categories

(Core :: DOM: File, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: baku, Assigned: baku)

Details

Attachments

(1 file, 1 obsolete file)

Fetch uses MutableBlobStorage always in 'in-memory' configuration. This happens because we don't set the principalInfo in the InternalResponse object.
Attached patch fetch_blob.patch (obsolete) — — Splinter Review
a couple of comments about this patch: 1. we cannot use NS_DISPATCH_SYNC on the necko thread. I changed this to NS_DISPATCH_NORMAL. 2. It's important to use lock when the actor is set. 3. Tests are nice, but they are not actually testing MutableBlobStorage, because it's impossible to see if the blob data has been stored into a temporary file.
Assignee: nobody → amarchesini
Attachment #9030842 - Flags: review?(bugs)
For testing, we could have a [ChromeOnly] thing on the Blob object the test the backend.
Comment on attachment 9030842 [details] [diff] [review] fetch_blob.patch I think I'd like to see that webidl property for testing. Or it could be also some helper method in nsIDOMWindowUtils or so. But anyhow, some way for tests to check that we use the expected blob backend. Otherwise regressions are quite likely.
Attachment #9030842 - Flags: review?(bugs)
Attached patch fetch_blob.patch — — Splinter Review
Attachment #9030842 - Attachment is obsolete: true
Attachment #9031805 - Flags: review?(bugs)
Comment on attachment 9031805 [details] [diff] [review] fetch_blob.patch In the commit message s/use/used/
Attachment #9031805 - Flags: review?(bugs) → review+
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/2ed660a4a701 MutableBlobStorage should be used in eCouldBeInTemporaryFile mode for fetch(), r=smaug
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: