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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user