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)

x86
Windows NT
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla0.9

People

(Reporter: toml, Assigned: dougt)

References

Details

(Whiteboard: waiting for review.)

Attachments

(2 files)

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 qa contact.
QA Contact: janc → bsharma
Target Milestone: --- → mozilla0.9
Blocks: 62399
hey doug, I'm giving this one to you :-) 'cause you're the FileInputStream owner... -- rick
Assignee: rpotts → dougt
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?
Status: NEW → ASSIGNED
Keywords: patch
Whiteboard: waiting for review.
r=gagan
sr=darin
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Marking verified as per above developer comments.
Status: RESOLVED → VERIFIED
Blocks: 96683
No longer blocks: 96683
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: