Closed Bug 50661 Opened 24 years ago Closed 23 years ago

XML documents loaded via nsDOMNSDocument::Load don't initialize required fields

Categories

(Core :: XML, defect, P3)

x86
Windows NT
defect

Tracking

()

RESOLVED WORKSFORME
mozilla0.9.3

People

(Reporter: toml, Assigned: hjtoi-bugzilla)

References

Details

From Bugzilla Helper: User-Agent: Mozilla/4.72 [en] (WinNT; U) BuildID: 2000073008 Using the nsDOMNSDocument::Load interface to load an XML document doesn't initialize some fields within the document. In particular, the mDocumentURL is not initialized so that when GetDocumentURL is invoked is returns a null rather than the nsIURI object associated with the document and the channel. It looks like some of the Reset code needs to be executed for this load so that some of the fields can be initialized, but not all of the Reset code as this would remove the DOM event listener that I register before doing the load. Reproducible: Always Steps to Reproduce: Load an XML document using code similar to the following: > mDOMDocument = do_CreateInstance( kXMLDocumentCID, &rv ); > if (NS_SUCCEEDED( rv )) { > pDOMEventTarget = do_QueryInterface( mDOMDocument, &rv ); > if (NS_SUCCEEDED( rv )) { > pDOMEventListener = do_QueryInterface( this, &rv ); > if (NS_SUCCEEDED( rv )) { > sLoadCommand.AssignWithConversion( "load" ); > rv = pDOMEventTarget->AddEventListener( sLoadCommand, pDOMEventListener, PR_FALSE ); > if (NS_SUCCEEDED( rv )) { > pDOMNSDocument = do_QueryInterface( mDOMDocument, &rv ); > if (NS_SUCCEEDED( rv )) { > rv = pDOMNSDocument->Load( mReadURI ); > } > } > } > } > } Actual Results: Expected Results:
Taking, goes well with the other stuff I am doing...
Assignee: nisheeth → heikki
Target Milestone: --- → mozilla0.9
Target Milestone: mozilla0.9 → mozilla0.9.1
Blocks: 62399
I fixed the document URL. I haven't found anything else I would need to reset. Can this be closed?
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Whiteboard: worksforme?
I am marking this as worksforme now. If somebody finds a new issue, please reopen.
Whiteboard: worksforme?
Target Milestone: mozilla0.9.2 → mozilla0.9.3
wfm
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
Blocks: 96683
No longer blocks: 96683
QA Contact: petersen → rakeshmishra
You need to log in before you can comment on or make changes to this bug.