Closed Bug 875895 Opened 12 years ago Closed 12 years ago

assertion with WantAllTraces

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

Benoit is hitting this assertion I added in bug 873111: 1867 MOZ_ASSERT(nsCycleCollectionNoteRootCallback::WantAllTraces() == 1868 nsCycleCollectionTraversalCallback::WantAllTraces()); I'm going to guess that I just totally botched this and never tested WantAllTraces().
Much to my surprise, I didn't totally mess this up, and it seems okay to me in a local OSX build with the basic AllTraces() instructions from https://wiki.mozilla.org/Performance:Leak_Tools#Cycle_collector_heap_dump What did you do to trigger this assertion, Benoit?
Flags: needinfo?(bjacob)
So all I did was use a built with my 'refgraph' patch and do a regular cycle collection, window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIDOMWindowUtils) .cycleCollect(); However I just realized now that I still have this hunk in my patch, --- a/xpcom/glue/nsCycleCollectionTraversalCallback.h +++ b/xpcom/glue/nsCycleCollectionTraversalCallback.h @@ -46,7 +46,7 @@ public: }; uint32_t Flags() const { return mFlags; } bool WantDebugInfo() const { return (mFlags & WANT_DEBUG_INFO) != 0; } - bool WantAllTraces() const { return (mFlags & WANT_ALL_TRACES) != 0; } + bool WantAllTraces() const { return true; } protected: nsCycleCollectionTraversalCallback() : mFlags(0) {} Do I still need this, however? I am now using a custom subclass of nsICycleCollectorListener where GetWantAllTraces gives true. Trying without the above hunk, but I would like a confirmation that just having the listener's GetWantAllTraces give true is enough to ensure that a CycleCollectNow call on this listener will do AllTraces.
Flags: needinfo?(bjacob)
Oh, yeah, that would be the problem. :) In the future if you want to do that for some reason, you'll have to make a similar change to nsCycleCollectionNoteRootCallback::WantAllTraces(). Making GetWantAllTraces() on the listener returning true should be enough. Thanks for the followup.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Sorry about the noise and thanks for the great customer support!
You need to log in before you can comment on or make changes to this bug.