Really, the logic for skipping non-JS edges out of nsINode should probably be moved entirely into CanSkipThis, and Traverse should always succeed.
Created attachment 607365 [details] [diff] [review] disable want all traces I did an audit of every place where NS_SUCCESS_INTERRUPTED is returned to make sure that it was being properly handled. It may make more sense in the long term to rip out all of that logic and move it into CanSkipThis, and make Traverse always succeed, but this will do for now.
Created attachment 607366 [details] [diff] [review] disable want all traces, for reals
This patch is hard to read, but what I did was take the entire block of code at the start of nsINode::Traverse and wrap it in a !cb.WantAllTraces() test. I also dropped the cb argument to InGeneration, because we don't have to check cb any more if we're in that block. The code should be otherwise unchanged.
According to tree management, this caused some DOM-y regressions on Linux64. I'm skeptical that an additional highly predictable branch (these tests are always true except when dumping a CC log) per DOM node visited by the cycle collector could cause a 3% regression, but I guess it is possible. Maybe I need to sprinkle some NS_LIKELY pixie dust around. https://groups.google.com/forum/#!topic/mozilla.dev.tree-management/VTerA5eCc6M
Created attachment 608197 [details] [diff] [review] add NS_LIKELY for new !WantAllTraces checks Can't hurt, I guess.
Comment on attachment 608197 [details] [diff] [review] add NS_LIKELY for new !WantAllTraces checks The backout didn't cause a corresponding increase, so I guess the regression was bogus, but it can't hurt to help GCC out a little.
Thanks for the quick review. Relanded, with the additional patch folded in. https://hg.mozilla.org/integration/mozilla-inbound/rev/72bcaa8ab10d