Open
Bug 349266
Opened 18 years ago
Updated 2 years ago
nsStorageStream publicly implements nsIOutputStream and QIs to it
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
NEW
mozilla1.9alpha1
People
(Reporter: Waldo, Unassigned)
Details
This basically means that the one-and-only-outputstream (and write) checks are useless: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/xpcom/io/nsStorageStream.cpp&rev=1.32&mark=117,135#110 I think this might be helped by making nsStorageStream inherit from nsIOutputStream privately (I don't know enough about C++ access modifiers in inheritance to say for sure), although that doesn't eliminate QI-ability. I'm pretty sure more changes are needed here to ensure this works correctly.
Comment 1•12 years ago
|
||
What if we just made nsIStorageStream inherit from nsIOutputStream, and removed nsIStorageStream::GetOutputStream?
Comment 2•12 years ago
|
||
Oh, we'd have to make nsStorageStream implement nsISeekableStream as well.
Reporter | ||
Comment 3•12 years ago
|
||
I'm a bit far away from this thing at this point, but nsIStorageStream, despite having the name "stream" in it, is not is-a stream. It provides access to an output that you can write to, and it provides access to input(s, if memory serves) that you can read from. It definitely shouldn't inherit from nsIOutputStream.
Comment 4•2 years ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Assignee: jwalden → nobody
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•