Move the BindToTree call for the document element into SetRootContent. Bug
289209, r=sicking, sr=jst, a=asa git-svn-id: svn://10.0.0.236/trunk@172254 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -857,14 +857,12 @@ nsXMLContentSink::SetDocElement(PRInt32 aNameSpaceID,
|
||||
mDocElement = aContent;
|
||||
NS_ADDREF(mDocElement);
|
||||
|
||||
nsresult rv = mDocElement->BindToTree(mDocument, nsnull, nsnull, PR_TRUE);
|
||||
nsresult rv = mDocument->SetRootContent(mDocElement);
|
||||
if (NS_FAILED(rv)) {
|
||||
mDocElement->UnbindFromTree();
|
||||
// If we return PR_FALSE here, the caller will bail out because it won't
|
||||
// find a parent content node to append to, which is fine.
|
||||
return PR_FALSE;
|
||||
}
|
||||
mDocument->SetRootContent(mDocElement);
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user