nsCycleCollector: nsXULTooltipListener 0x217bc040 was not collected due to 36 external references (38 total - 2 known) An object expected to be garbage could be reached from it by the path: nsXULTooltipListener 0x217bc040 nsGenericElement 0x1830f740 nsEventListenerManager 0x1830f6e0 nsJSEventListener 0x19705370 JS Object (ChromeWindow) (global=1645a3c0) 0x1645a3c0 nsGlobalWindow 0x183eccdc The 2 known references to it were from: nsEventListenerManager 0x1830f6e0 nsEventListenerManager 0x1830f6e0 Working on getting a ref tree...
Created attachment 303636 [details] [diff] [review] Use weak refs, v1 Turns out that those external refs were due to the nsCCUncollectableMarker preventing traversion of live windows and documents... Grr. Anyway, this uses weak refs to prevent the tooltip listener from holding a dead window alive.
Comment on attachment 303636 [details] [diff] [review] Use weak refs, v1 Seems OK, but I don't understand is the nsLayoutStatics.cpp change. Also, make sure to get a superreview from someone who knows a lot about memory/cycle collector stuff.
Comment on attachment 303636 [details] [diff] [review] Use weak refs, v1 > diff -NprU8 mozilla.1d899a2c09d9/layout/xul/base/src/nsXULTooltipListener.h mozilla/layout/xul/base/src/nsXULTooltipListener.h Remove the inclusion of nsCycleCollectionParticipant.h.