Bug 937303 - Make CC logger to pass information about compartments, r=mccr8

This commit is contained in:
Olli Pettay
2013-11-12 15:53:51 +02:00
parent ec2a7f1ab2
commit ba341e43bd
5 changed files with 36 additions and 17 deletions

View File

@@ -518,8 +518,10 @@ CycleCollectedJSRuntime::DescribeGCThing(bool aIsMarked, void* aThing,
}
char name[72];
uint64_t compartmentAddress = 0;
if (aTraceKind == JSTRACE_OBJECT) {
JSObject* obj = static_cast<JSObject*>(aThing);
compartmentAddress = (uint64_t)js::GetObjectCompartment(obj);
const js::Class* clasp = js::GetObjectClass(obj);
// Give the subclass a chance to do something
@@ -555,7 +557,7 @@ CycleCollectedJSRuntime::DescribeGCThing(bool aIsMarked, void* aThing,
}
// Disable printing global for objects while we figure out ObjShrink fallout.
aCb.DescribeGCedNode(aIsMarked, name);
aCb.DescribeGCedNode(aIsMarked, name, compartmentAddress);
}
void