Closed
Bug 1360476
Opened 8 years ago
Closed 8 years ago
IPCBlobInputStream needs to be seekable on the parent side
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla55
| Tracking | Status | |
|---|---|---|
| firefox55 | --- | fixed |
People
(Reporter: baku, Assigned: baku)
References
Details
Attachments
(1 file, 1 obsolete file)
|
4.11 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
When a IPCBlobInputStream child actor is running in the parent process, necko treats it as a 'regular' inputStream and it tries to QI to nsISeekableInputStream.
| Assignee | ||
Comment 1•8 years ago
|
||
This issue appears because of the porting of IDB to IPCBlob.
Blocks: 1353629
| Assignee | ||
Comment 2•8 years ago
|
||
Assignee: nobody → amarchesini
Attachment #8862752 -
Flags: review?(bugs)
Comment 3•8 years ago
|
||
Why do we need this fix? What is broken now? Why that brokenness isn't something noticed by tests?
Comment 4•8 years ago
|
||
Comment on attachment 8862752 [details] [diff] [review]
seekable.patch
>+bool
>+IPCBlobInputStream::IsSeekableStream() const
>+{
>+ // We are nsISeekableStream only if we have the remote stream and that is a
>+ // nsISeekableStream.
This comment is in wrong place. Should be next to do_QueryInterface(mRemoteStream);
>+
>+ if (mState != eRunning) {
>+ return false;
>+ }
This needs a comment. Or, is there actually any need for this check?
>+
>+ MOZ_ASSERT(mRemoteStream);
>+ nsCOMPtr<nsISeekableStream> seekableStream = do_QueryInterface(mRemoteStream);
>+ return !!seekableStream;
since you anyhow have this
>+IPCBlobInputStream::Seek(int32_t aWhence, int64_t aOffset)
>+{
>+ if (mState != eRunning) {
>+ return NS_BASE_STREAM_CLOSED;
>+ }
>+
>+ MOZ_ASSERT(mRemoteStream);
>+ nsCOMPtr<nsISeekableStream> seekableStream = do_QueryInterface(mRemoteStream);
>+ if (!seekableStream) {
>+ return NS_ERROR_FAILURE;
>+ }
and can't we do similar thing here. Just rely on the QI, no need to check mState
>+IPCBlobInputStream::Tell(int64_t *aResult)
nit, * goes with type
>+{
>+ if (mState != eRunning) {
>+ return NS_BASE_STREAM_CLOSED;
>+ }
>+
>+ MOZ_ASSERT(mRemoteStream);
>+ nsCOMPtr<nsISeekableStream> seekableStream = do_QueryInterface(mRemoteStream);
>+ if (!seekableStream) {
>+ return NS_ERROR_FAILURE;
>+ }
I guess here too?
Attachment #8862752 -
Flags: review?(bugs) → review-
| Assignee | ||
Comment 5•8 years ago
|
||
Attachment #8862752 -
Attachment is obsolete: true
Attachment #8862764 -
Flags: review?(bugs)
Updated•8 years ago
|
Attachment #8862764 -
Flags: review?(bugs) → review+
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/03213181829e
IPCBlobInputStream needs to be seekable on the parent side, r=smaug
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c460929df438
IPCBlobInputStream needs to be seekable on the parent side, r=me
Comment 8•8 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/03213181829e
https://hg.mozilla.org/mozilla-central/rev/c460929df438
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
•