зеркало из https://github.com/mozilla/gecko-dev.git
Bug 461640 - Box objects should participate in cycle collection, r=smaug
--HG-- extra : rebase_source : 337d82f08d17641dd4306c55743a076f53a4a22f
This commit is contained in:
Родитель
96d6e39cec
Коммит
2d8aaafab9
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче