I just got a leak monitor alert after closing a view-source window: Leaks in window 0x20839d00: [+] [leaked object] (20840b00) = [Object] [ ] timeout = 0 [ ] notifySelectionChanged (20840b40, chrome://global/content/viewSource.js, 25-29) = [Function] The leak went away after the next GC (I got a "reclaimed leak alert"). I can't figure out how to get this to happen again. However, from looking at code, I'm willing to guess that it might not have happened in the first place if nsTypedSelection's cycle collection implementation traversed and unlinked its mSelectionListeners.
I'm not sure why peterv didn't do this in bug 471126. We can also use this patch to address bug 471126 comment 20.
Created attachment 374536 [details] [diff] [review] patch
Comment on attachment 374536 [details] [diff] [review] patch I think I was worried about selection listeners not getting notifications of the removal of the ranges. I guess we can try it out.
BTW, I don't think the notifications from the removal of the ranges in unlink is a problem, because unlink happens from the GC callback for JSGC_END.
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
OS: Linux → All
Priority: -- → P4
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
You need to log in before you can comment on or make changes to this bug.