Bug 461640 - Box objects should participate in cycle collection, r=smaug

--HG--
extra : rebase_source : 337d82f08d17641dd4306c55743a076f53a4a22f
This commit is contained in:
peterv@propagandism.org 2009-08-21 15:51:08 +03:00
Родитель 96d6e39cec
Коммит 2d8aaafab9
1 изменённых файлов: 14 добавлений и 2 удалений

Просмотреть файл

@ -78,10 +78,22 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsBoxObject)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(BoxObject)
NS_INTERFACE_MAP_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsBoxObject)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
PR_STATIC_CALLBACK(PLDHashOperator)
PropertyTraverser(const nsAString& aKey, nsISupports* aProperty, void* userArg)
{
nsCycleCollectionTraversalCallback *cb =
static_cast<nsCycleCollectionTraversalCallback*>(userArg);
cb->NoteXPCOMChild(aProperty);
return PL_DHASH_NEXT;
}
NS_IMPL_CYCLE_COLLECTION_UNLINK_0(nsBoxObject)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsBoxObject)
if (tmp->mPropertyTable) {
tmp->mPropertyTable->EnumerateRead(PropertyTraverser, &cb);
}
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
// Constructors/Destructors