Use new GetDocument API

git-svn-id: svn://10.0.0.236/trunk@3060 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp 1998-06-03 15:59:24 +00:00
parent 2a34a0afa1
commit e6ac50ef0f

View File

@ -317,9 +317,12 @@ void nsForm::OnSubmit(nsIPresContext* aPresContext, nsIFrame* aFrame,
nsIContent* content;
aFrame->GetContent(content);
if (nsnull != content) {
nsIDocument* doc = content->GetDocument();
docURL = doc->GetDocumentURL();
NS_RELEASE(doc);
nsIDocument* doc = nsnull;
content->GetDocument(doc);
if (nsnull != doc) {
docURL = doc->GetDocumentURL();
NS_RELEASE(doc);
}
NS_RELEASE(content);
}