Bug 726343 - Improve DOMEventTargetHelper CC logging, r=mccr8

This commit is contained in:
Olli Pettay 2012-02-12 15:09:18 +02:00
Родитель c03887bf6f
Коммит 5316bb7e83
1 изменённых файлов: 15 добавлений и 1 удалений

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

@ -72,7 +72,21 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(nsDOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER
NS_IMPL_CYCLE_COLLECTION_TRACE_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsDOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsDOMEventTargetHelper)
if (NS_UNLIKELY(cb.WantDebugInfo())) {
char name[512];
nsAutoString uri;
if (tmp->mOwner && tmp->mOwner->GetExtantDocument()) {
tmp->mOwner->GetExtantDocument()->GetDocumentURI(uri);
}
PR_snprintf(name, sizeof(name), "nsDOMEventTargetHelper %s",
NS_ConvertUTF16toUTF8(uri).get());
cb.DescribeRefCountedNode(tmp->mRefCnt.get(), sizeof(nsDOMEventTargetHelper),
name);
} else {
NS_IMPL_CYCLE_COLLECTION_DESCRIBE(nsDOMEventTargetHelper, tmp->mRefCnt.get())
}
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NATIVE_MEMBER(mListenerManager,
nsEventListenerManager)