Closed
Bug 490071
Opened 16 years ago
Closed 16 years ago
nsTypedSelection cycle collection should traverse to mSelectionListeners
Categories
(Core :: DOM: Selection, defect, P4)
Core
DOM: Selection
Tracking
()
RESOLVED
FIXED
mozilla1.9.2a1
People
(Reporter: dbaron, Assigned: dbaron)
Details
(Keywords: memory-leak)
Attachments
(1 file)
1.58 KB,
patch
|
peterv
:
review+
peterv
:
superreview+
|
Details | Diff | Splinter Review |
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.
Assignee | ||
Comment 1•16 years ago
|
||
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.
Assignee | ||
Comment 2•16 years ago
|
||
Assignee: nobody → dbaron
Status: NEW → ASSIGNED
Attachment #374536 -
Flags: superreview?(peterv)
Attachment #374536 -
Flags: review?(peterv)
Updated•16 years ago
|
Attachment #374536 -
Flags: superreview?(peterv)
Attachment #374536 -
Flags: superreview+
Attachment #374536 -
Flags: review?(peterv)
Attachment #374536 -
Flags: review+
Comment 3•16 years ago
|
||
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.
Comment 4•16 years ago
|
||
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.
Assignee | ||
Comment 5•16 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 16 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.
Description
•