Add ownerDocument to reachable list when needed. b=241518 r=bzbarsky sr=jst

This commit is contained in:
dbaron@dbaron.org
2005-12-06 05:50:12 +00:00
parent 4d2ae55ea7
commit c0a8fc3a04
2 changed files with 18 additions and 0 deletions

View File

@@ -1046,6 +1046,15 @@ nsGenericElement::GetSCCIndex()
void
nsGenericElement::AppendReachableList(nsCOMArray<nsIDOMGCParticipant>& aArray)
{
NS_ASSERTION(GetCurrentDoc() == nsnull,
"shouldn't be an SCC index if we're in a doc");
NS_ASSERTION(GetOwnerDoc(), "no owner document");
// This node is the root of a subtree that's been removed from the
// document (since AppendReachableList is only called on SCC index
// nodes). The document is reachable from it (through
// .ownerDocument), but it's not reachable from the document.
aArray.AppendObject(GetOwnerDoc());
}
NS_IMETHODIMP