Skip to content
Snippets Groups Projects
Commit 9c77538f authored by Olli Pettay's avatar Olli Pettay
Browse files

Bug 750109, outerhtml crash, r=hsivonen,sicking

parent 4e6bdfff
No related branches found
No related tags found
No related merge requests found
......@@ -820,7 +820,7 @@ nsGenericHTMLElement::SetInnerHTML(const nsAString& aInnerHTML)
NS_IMETHODIMP
nsGenericHTMLElement::SetOuterHTML(const nsAString& aOuterHTML)
{
nsINode* parent = GetNodeParent();
nsCOMPtr<nsINode> parent = GetNodeParent();
if (!parent) {
return NS_OK;
}
......@@ -833,8 +833,8 @@ nsGenericHTMLElement::SetOuterHTML(const nsAString& aOuterHTML)
nsIAtom* localName;
PRInt32 namespaceID;
if (parent->IsElement()) {
localName = static_cast<nsIContent*>(parent)->Tag();
namespaceID = static_cast<nsIContent*>(parent)->GetNameSpaceID();
localName = static_cast<nsIContent*>(parent.get())->Tag();
namespaceID = static_cast<nsIContent*>(parent.get())->GetNameSpaceID();
} else {
NS_ASSERTION(parent->NodeType() == nsIDOMNode::DOCUMENT_FRAGMENT_NODE,
"How come the parent isn't a document, a fragment or an element?");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment