From 5a14040570453bcb40d5175b7a12e58b96e03698 Mon Sep 17 00:00:00 2001 From: Olli Pettay Date: Wed, 8 Oct 2008 14:13:26 +0300 Subject: [PATCH] Bug 451323, r+sr=roc --- content/base/src/nsTextNode.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/content/base/src/nsTextNode.cpp b/content/base/src/nsTextNode.cpp index 7d48e41acb2..077ecde84e0 100644 --- a/content/base/src/nsTextNode.cpp +++ b/content/base/src/nsTextNode.cpp @@ -112,6 +112,7 @@ public: PRBool aNullParent = PR_TRUE); NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED + NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED virtual nsGenericDOMDataNode *CloneDataNode(nsINodeInfo *aNodeInfo, PRBool aCloneText) const @@ -358,6 +359,13 @@ nsAttributeTextNode::AttributeChanged(nsIDocument* aDocument, } } +void +nsAttributeTextNode::NodeWillBeDestroyed(const nsINode* aNode) +{ + NS_ASSERTION(aNode == static_cast(mGrandparent), "Wrong node!"); + mGrandparent = nsnull; +} + void nsAttributeTextNode::UpdateText(PRBool aNotify) {