Closed Bug 1397627 Opened 7 years ago Closed 7 years ago

IPCBlobInputStream must be always async and non-blocking

Categories

(Core :: DOM: File, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Performance Impact high
Tracking Status
firefox57 --- fixed

People

(Reporter: baku, Assigned: baku)

References

Details

(Whiteboard: [bhr])

Attachments

(4 files)

This will avoid doing I/O on main-thread.
Whiteboard: [qf:p1][bhr]
Smaug, you have already seen this patch before.
Attachment #8905371 - Flags: review?(bugs)
This patch has been reviewed by smaug for bug 1381465.
This patch has been already reviewed by asuth in bug 1381465
Attachment #8905373 - Attachment description: IPCBlobInputStream should always be async → part 1 - IPCBlobInputStream should always be async
Attachment #8905371 - Attachment description: IPCBlobInputStream should not be seekable → part 2 - IPCBlobInputStream should not be seekable
We should propagate the size of the stream (when known) into necko when calling ExplicitSetUploadStream() otherwise Available() will be used.
Attachment #8905376 - Flags: review?(bugs)
Depends on: 1397635
Comment on attachment 8905371 [details] [diff] [review]
part 2 - IPCBlobInputStream should not be seekable

Please comment here in the bug (and perhaps also in the commit message) _why_ IPCBlobInputStream shouldn't be seekable, or why we don't need this code anymore.
Totally not clear from this bug currently.
Attachment #8905371 - Flags: review?(bugs) → review+
Comment on attachment 8905376 [details] [diff] [review]
part 4 - Fetch and other APIs vs necko and the size of the stream

I think I'd prefer that instead of passing -1, which has special meaning, something like UNKNOWN_BODY_SIZE.
So, please use InternalResponse::UNKNOWN_BODY_SIZE or add a new named constant and use that.
Attachment #8905376 - Flags: review?(bugs) → review+
Depends on: 1377589
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b4f8fad33b2f
IPCBlobInputStream doesn't need to be seekable, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/f77a81b06e43
IPCBlobInputStream should be always async, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/85b18b5a5e43
nsIAsyncFileMetadata interface, r=asuth
https://hg.mozilla.org/integration/mozilla-inbound/rev/6933c6396bda
Fetch API and other components should pass the length of the stream to necko when known, r=smaug
Blocks: 1398733
Depends on: 1399215
(tweaking dependency field to replace bug 1399215 with its dupe-target, bug 1398556)
Depends on: 1398556
No longer depends on: 1399215
Depends on: 1398487
Depends on: 1398635
No longer depends on: 1398487
Performance Impact: --- → P1
Whiteboard: [qf:p1][bhr] → [bhr]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: