Closed
Bug 1359359
Opened 8 years ago
Closed 8 years ago
FileReaderSync should be able to read from a nsIAsyncInputStream
Categories
(Core :: DOM: Core & HTML, enhancement)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla55
| Tracking | Status | |
|---|---|---|
| firefox55 | --- | fixed |
People
(Reporter: baku, Assigned: baku)
References
Details
Attachments
(3 files)
|
3.68 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
|
6.98 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
|
2.80 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
Currently FileReaderSync wants a sync nsIInputStream.
It's not able to deal with the new IPCBlobInputStream.
| Assignee | ||
Comment 1•8 years ago
|
||
Right now this is executed on the current thread. This is not compatible with the use of IPCBlobInputStream in sync event loop in workers.
Assignee: nobody → amarchesini
Attachment #8861351 -
Flags: review?(bugs)
| Assignee | ||
Comment 2•8 years ago
|
||
Attachment #8861352 -
Flags: review?(bugs)
| Assignee | ||
Comment 3•8 years ago
|
||
Attachment #8861353 -
Flags: review?(bugs)
Updated•8 years ago
|
Attachment #8861351 -
Flags: review?(bugs) → review+
Updated•8 years ago
|
Attachment #8861352 -
Flags: review?(bugs) → review+
Comment 4•8 years ago
|
||
Comment on attachment 8861353 [details] [diff] [review]
part 2 - tests
>+let workerUrl = URL.createObjectURL(new Blob(["(", workerScript.toSource(), ")()"]));
>+let worker = new Worker(workerUrl);
>+worker.onmessage = event => {
>+ ok(event.data.length, "The file has been read");
I would prefer if this tested that the expected data was actually read.
Could you for example read the data asynchronously in the main thread and then compare that the _exactly_ same
data is read synchronously in worker as is asynchronously in main thread.
With that, r+
Attachment #8861353 -
Flags: review?(bugs) → review+
Comment 5•8 years ago
|
||
And please ensure that there are also tests for memory blob reading with workers!
That too is required for the r+.
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b65172f39db5
IPCBlobInputStream should execute StreamReady() in the target thread of AsyncWait, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/25c997594daa
FileReaderSync should support nsIAsyncInputStream, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/46389058f13d
Tests for FileReaderSync and IPCBlobInputStream, r=smaug
Comment 7•8 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/b65172f39db5
https://hg.mozilla.org/mozilla-central/rev/25c997594daa
https://hg.mozilla.org/mozilla-central/rev/46389058f13d
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
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
•