From 2bdee9bb252ef38d8b8ab6a4da133db36a1a1445 Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Sun, 21 Aug 2005 21:32:20 +0000 Subject: [PATCH] Bug 304759. Forgot to check in one hunk of the patch on branch. git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@178569 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/base/src/nsDocument.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mozilla/content/base/src/nsDocument.cpp b/mozilla/content/base/src/nsDocument.cpp index 6dc96a3d394..e204be7a623 100644 --- a/mozilla/content/base/src/nsDocument.cpp +++ b/mozilla/content/base/src/nsDocument.cpp @@ -3639,6 +3639,11 @@ nsDocument::ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, mChildren.RemoveObjectAt(indx); + if (nodeType == nsIDOMNode::ELEMENT_NODE) { + // This must be replacing the root node. Tear down the link map + // because we're going to unbind all content. + DestroyLinkMap(); + } ContentRemoved(nsnull, refContent, indx); refContent->UnbindFromTree();