mshtml: Don't fail in IHTMLDOMNode::appendChild if AppendChild failed.

This commit is contained in:
Jacek Caban 2008-10-13 14:51:04 -05:00 committed by Alexandre Julliard
parent beec20f2f5
commit 7c8cdd519b
1 changed files with 3 additions and 2 deletions

View File

@ -512,6 +512,7 @@ static HRESULT WINAPI HTMLDOMNode_removeChild(IHTMLDOMNode *iface, IHTMLDOMNode
/* FIXME: Make sure that node != newChild */ /* FIXME: Make sure that node != newChild */
*node = HTMLDOMNODE(get_node(This->doc, nsnode, TRUE)); *node = HTMLDOMNODE(get_node(This->doc, nsnode, TRUE));
nsIDOMNode_Release(nsnode);
IHTMLDOMNode_AddRef(*node); IHTMLDOMNode_AddRef(*node);
return S_OK; return S_OK;
} }
@ -572,8 +573,8 @@ static HRESULT WINAPI HTMLDOMNode_appendChild(IHTMLDOMNode *iface, IHTMLDOMNode
nsres = nsIDOMNode_AppendChild(This->nsnode, node_obj->nsnode, &nsnode); nsres = nsIDOMNode_AppendChild(This->nsnode, node_obj->nsnode, &nsnode);
if(NS_FAILED(nsres)) { if(NS_FAILED(nsres)) {
ERR("AppendChild failed: %08x\n", nsres); WARN("AppendChild failed: %08x\n", nsres);
return E_FAIL; nsnode = node_obj->nsnode;
} }
/* FIXME: Make sure that node != newChild */ /* FIXME: Make sure that node != newChild */