Closed
Bug 315159
Opened 20 years ago
Closed 20 years ago
Enable the Stream Converter graph code
Categories
(Core :: Networking, enhancement, P5)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: darin.moz, Assigned: darin.moz)
Details
Attachments
(1 file)
|
4.15 KB,
patch
|
Biesinger
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
It turns out that we fail to populate the stream converter category because of a bug introduced back in 2002.
Note the computation of g_StreamConverterCount is bogus:
http://lxr.mozilla.org/mozilla/source/netwerk/build/nsNetModule.cpp#308
Moreover, if you take a look at the set of stream converters that we implement, there are hardly any useful "edges" in the would-be graph.
So, I think we should just remove the dead code.
| Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.9alpha
Comment 1•20 years ago
|
||
Hmm. This would basically remove most of the stuff in nsStreamConverterService? As in, the chaining that it tries to implement just doesn't work and hasn't in a while?
I guess no one's really using this stuff, so perhaps it's just a tad over-engineered... ;)
Comment 2•20 years ago
|
||
Although... For extensions or embeddors that implement stream converters and register with the category, the graph code would still work; this typo just affects our built-in list there.
Comment 3•20 years ago
|
||
I was actually considering making use of this: Removing the explicit stream converter calls in FTP and Gopher directory listings would save some code. (But it'd have downsides - it wouldn't consistently expose an http-index-format type for a directory listing. So that may not be a good idea; and that's why I didn't make a patch for that yet.)
Would trying to save an eml file (in SeaMonkey) as a plain text file trigger this code? hm... that probably just goes through a DOM serializer, so no.
| Assignee | ||
Comment 4•20 years ago
|
||
The basechannel work touches the gopher (and shortly the ftp) code extensively. In particular, I've made it so that any subclass of nsBaseChannel can simply call a method (PushStreamConverter) to add a stream converter into the listener chain. It somewhat reduces the code involved for each protocol, which is nice. I like the fact that protocols generate http-index-format for directory listings.
I think this stream converter graph business is overkill, and I'd rather just remove it. I think stream converters could be simplified greatly. In particular, I think that they should not have to implement anything more than nsIInputStream reading from another nsIInputStream, but that's a much more involved change.
| Assignee | ||
Comment 5•20 years ago
|
||
biesi, boris: so do we want to fix and enable the stream converter graph code, or do we want to remove it?
Priority: -- → P5
Comment 6•20 years ago
|
||
I think I'd prefer fixing it....
| Assignee | ||
Comment 7•20 years ago
|
||
OK
Summary: Delete the useless (and unused) Stream Converter graph code → Enable the Stream Converter graph code
Comment 8•20 years ago
|
||
yeah, I think I'd prefer that too.
| Assignee | ||
Comment 9•20 years ago
|
||
Attachment #215849 -
Flags: superreview?(bzbarsky)
Attachment #215849 -
Flags: review?(cbiesinger)
Comment 10•20 years ago
|
||
Comment on attachment 215849 [details] [diff] [review]
v1 patch
having a unit test for the graph code might be good...
Attachment #215849 -
Flags: review?(cbiesinger) → review+
Updated•20 years ago
|
Attachment #215849 -
Flags: superreview?(bzbarsky) → superreview+
| Assignee | ||
Comment 11•20 years ago
|
||
fixed-on-trunk... yeah, a test case would be nice...
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•