Fix for bug 415192 (Crash (within nsCycleCollector::Shutdown and nsXBLBinding::RemoveInsertionParent) with <xul:wizard>, cloneNode). r/sr=sicking.

git-svn-id: svn://10.0.0.236/trunk@248764 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterv%propagandism.org
2008-03-28 14:09:03 +00:00
parent 0f6700a459
commit 2eaf19396d
14 changed files with 143 additions and 48 deletions

View File

@@ -61,6 +61,7 @@
#include "nsCOMArray.h"
#include "nsNodeUtils.h"
#include "nsBindingManager.h"
#include "nsCCUncollectableMarker.h"
#include "pldhash.h"
#include "prprf.h"
@@ -79,6 +80,19 @@ nsGenericDOMDataNode::~nsGenericDOMDataNode()
NS_IMPL_CYCLE_COLLECTION_CLASS(nsGenericDOMDataNode)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsGenericDOMDataNode)
nsIDocument* currentDoc = tmp->GetCurrentDoc();
if (currentDoc && nsCCUncollectableMarker::InGeneration(
currentDoc->GetMarkedCCGeneration())) {
return NS_OK;
}
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mNodeInfo)
nsIDocument* ownerDoc = tmp->GetOwnerDoc();
if (ownerDoc) {
ownerDoc->BindingManager()->Traverse(tmp, cb);
}
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_LISTENERMANAGER
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_USERDATA
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_PRESERVED_WRAPPER