Deal with nsXPCWrappedJS::GetClass being null, which it can be after Unlink. a=Not part of the default build (DEBUG_CC only)

This commit is contained in:
dbaron@dbaron.org 2008-03-07 09:54:41 -08:00
parent fe6d7b2a9c
commit d6f406d8a8

View File

@ -59,8 +59,11 @@ NS_CYCLE_COLLECTION_CLASSNAME(nsXPCWrappedJS)::Traverse
nsrefcnt refcnt = tmp->mRefCnt.get();
#ifdef DEBUG_CC
char name[72];
JS_snprintf(name, sizeof(name), "nsXPCWrappedJS (%s)",
tmp->GetClass()->GetInterfaceName());
if (tmp->GetClass())
JS_snprintf(name, sizeof(name), "nsXPCWrappedJS (%s)",
tmp->GetClass()->GetInterfaceName());
else
JS_snprintf(name, sizeof(name), "nsXPCWrappedJS");
cb.DescribeNode(RefCounted, refcnt, sizeof(nsXPCWrappedJS), name);
#else
cb.DescribeNode(RefCounted, refcnt);