Add ownerDocument to reachable list when needed. b=241518 r=bzbarsky sr=jst
git-svn-id: svn://10.0.0.236/trunk@185732 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
4c020e2d54
commit
dfd0a1dbe2
@ -655,6 +655,15 @@ nsGenericDOMDataNode::GetSCCIndex()
|
||||
void
|
||||
nsGenericDOMDataNode::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());
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user