Open Bug 1031370 Opened 10 years ago Updated 1 year ago

Log dead objects in the CC graph

Categories

(Core :: Cycle Collector, defect)

defect

Tracking

()

People

(Reporter: mccr8, Unassigned)

References

(Blocks 1 open bug)

Details

This can be handy for debugging the cycle collector itself.  This is slightly tricky because right now we remove the pointer to the underlying object when it dies, for safety, but that prevents us from logging it later.
One approach I have tried is to make PtrInfo::mPointer private, and then add two getters, GetPointer() and GetPointerUnsafe(), where most uses, aside from logging, use GetPointer().  The only difference is that GetPointer() asserts that mParticipant is non-null.  Then you remove the nulling out of mPointer from RemoveObjectFromGraph().  That would at least catch cases in debug builds where we access dead pointers, but maybe that's not strong enough.
Severity: normal → S3
Component: XPCOM → Cycle Collector
You need to log in before you can comment on or make changes to this bug.