FireFox 4 crashes when trying to find the parent document for an internal document using DOM API GetParentDocument()
Madhu Tadiparthi <[email protected]> Tue, 3 May 2011 17:06:36 +0530
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Message-ID | <[email protected]> |
I have a web application where I have frames/Iframes in that. What I am
trying is to get the top level document from the internal document which is
a child of Frame/Iframe. I am facing an issue in getting the parent document
node from an internal document node in FireFox 4 using GetParentDocument
API. The browser is crashing at the Line 7 in the sample code. Here is the
sample code that I tried. The same is working good till Firefox 3.6
nsIDocument* getParentDocument(nsIDOMHTMLDocumentPtr htmlDocument )
{
nsIDocumentPtr document = do_QueryInterface(htmlDocument) ;
nsIDocument* parentDoc ;
parentDoc = document->GetParentDocument(); //Line 7
return parentDoc;
}
How can I get the parent document for the internal documents. Any
inputs/comments are higly appreciated.
Thanks
Madhu Tadiparthi