Fix for bug 558973 ("ASSERTION: Nodes that are not documents, document fragments or elements can't be parents!"). r=jst.

This commit is contained in:
Peter Van der Beken
2010-04-15 10:28:57 +02:00
parent 0d9990c00a
commit 49cff9a493
8 changed files with 77 additions and 24 deletions

View File

@@ -3751,6 +3751,14 @@ nsINode::ReplaceOrInsertBefore(PRBool aReplace, nsINode* aNewChild,
return NS_ERROR_NULL_POINTER;
}
if (IsNodeOfType(eDATA_NODE)) {
return NS_ERROR_DOM_HIERARCHY_REQUEST_ERR;
}
if (IsNodeOfType(eATTRIBUTE)) {
return NS_ERROR_NOT_IMPLEMENTED;
}
nsIContent* refContent;
nsresult res = NS_OK;
PRInt32 insPos;