Closed
Bug 64668
Opened 24 years ago
Closed 24 years ago
nsParser calling nsFileInputStream::ReadSegments which is not yet implemented
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
VERIFIED
FIXED
mozilla0.9
People
(Reporter: toml, Assigned: dougt)
References
Details
(Whiteboard: waiting for review.)
Attachments
(2 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (WinNT; U)
BuildID: 0000000000
When using the XMLExtras component nsDOMParser::ParseFromStream method an
assertion is encountered because nsParser attempts to call the ReadSegments
method of the supplied input stream, nsFileInputStream, and the method hasn't
been implemented yet.
Reproducible: Always
Steps to Reproduce:
1. Use NS_NewURI to create a new URI for a local XML file (file:///...
2. Use NS_OpenURI to create a channel for the URI
3. Call the channel's OpenInputStream method to obtain an input stream
4. Call the channel's Available method to obtain the amount of data available.
5. Create an instance of a DOMParser (NS_DOMPARSER_CONTRACTID)
6. Call the DOMParser's SetBaseURI with the URI created from step 1.
7. Call the DOMParser's ParseFromStream passing the in the:
- Input Stream
- "UTF-8"
- available data
- "text/xml"
- an output variable of type nsIDOMDocument
8. The assertion will occur during the call in step 7.
Actual Results: nsParser invokes the input streams ReadSegments method,
resulting in an assertion because it has not yet been implemented.
Expected Results: The XML data is parsed.
Hmm... I do not think Harish is the person to own this bug. Rick Potts?
This would also be a good time to think how we do stream peeks...
URL: -
Giving bug to Rick. CCing myself and Vidur.
Assignee: harishd → rpotts
Updated•24 years ago
|
Target Milestone: --- → mozilla0.9
Comment 4•24 years ago
|
||
hey doug,
I'm giving this one to you :-) 'cause you're the FileInputStream owner...
-- rick
Assignee: rpotts → dougt
Assignee | ||
Comment 5•24 years ago
|
||
Assignee | ||
Comment 6•24 years ago
|
||
Assignee | ||
Comment 7•24 years ago
|
||
This simple implementation will work as long as the user-define writer function
consumes all data. In the examples that I saw in the parser, this is the case.
If the writer doesn't consume everything, the implementation will assert.
At some point, we should complete this by saving the buffer and offsets. This
code was copied out of the jar input stream which I wrote.
gagan, can you please r= this?
darin, can you please sr= this?
Comment 9•24 years ago
|
||
sr=darin
Assignee | ||
Comment 10•24 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 11•24 years ago
|
||
Marking verified as per above developer comments.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•