assertion with WantAllTraces




6 years ago
6 years ago


(Reporter: mccr8, Assigned: mccr8)


Firefox Tracking Flags

(Not tracked)




6 years ago
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().

Comment 1

6 years ago
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

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,


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; }
   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)

Comment 3

6 years ago
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.
Last Resolved: 6 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.