Bug 1007780 - "Better CC log for nsGlobalWindow". r=continuation

This commit is contained in:
Olli Pettay 2014-05-08 10:58:00 +02:00
parent 3366917b4e
commit 82bd55c1cf

View File

@ -1698,7 +1698,13 @@ NS_IMPL_CYCLE_COLLECTION_CLASS(nsGlobalWindow)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsGlobalWindow)
if (MOZ_UNLIKELY(cb.WantDebugInfo())) {
char name[512];
PR_snprintf(name, sizeof(name), "nsGlobalWindow #%ld", tmp->mWindowID);
nsAutoCString uri;
if (tmp->mDoc && tmp->mDoc->GetDocumentURI()) {
tmp->mDoc->GetDocumentURI()->GetSpec(uri);
}
PR_snprintf(name, sizeof(name), "nsGlobalWindow #%ld %s %s",
tmp->mWindowID, tmp->IsInnerWindow() ? "inner" : "outer",
uri.get());
cb.DescribeRefCountedNode(tmp->mRefCnt.get(), name);
} else {
NS_IMPL_CYCLE_COLLECTION_DESCRIBE(nsGlobalWindow, tmp->mRefCnt.get())