Bug 1040380: Report the size of text nodes in the CC graph. r=smaug

--HG--
extra : rebase_source : bfb7217a8e617709e6f0a8e95d41563fdbd65959
This commit is contained in:
Kyle Huey 2014-07-18 10:41:34 -07:00
parent 183cbcc619
commit 894fac0b3f

View File

@ -89,7 +89,16 @@ NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(nsGenericDOMDataNode)
return Element::CanSkipThis(tmp);
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsGenericDOMDataNode)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsGenericDOMDataNode)
if (MOZ_UNLIKELY(cb.WantDebugInfo())) {
char name[40];
PR_snprintf(name, sizeof(name), "nsGenericDOMDataNode (len=%d)",
tmp->mText.GetLength());
cb.DescribeRefCountedNode(tmp->mRefCnt.get(), name);
} else {
NS_IMPL_CYCLE_COLLECTION_DESCRIBE(nsGenericDOMDataNode, tmp->mRefCnt.get())
}
// Always need to traverse script objects, so do that before we check
// if we're uncollectable.
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS