Firefox preferences window leaks global object due to radio.xml cycle

RESOLVED FIXED in mozilla1.8beta2

Status

()

Core
XUL
P1
normal
RESOLVED FIXED
13 years ago
11 years ago

People

(Reporter: dbaron, Assigned: dbaron)

Tracking

({mlk})

Trunk
mozilla1.8beta2
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [patch])

Attachments

(2 attachments)

3.12 KB, patch
Brian Ryner (not reading)
: review+
Brian Ryner (not reading)
: superreview+
Details | Diff | Splinter Review
4.08 KB, patch
Brian Ryner (not reading)
: review+
dbaron
: superreview+
Details | Diff | Splinter Review
(Assignee)

Description

13 years ago
The Firefox preferences window leaks its global object (and thus that of the
window that opened it) because there's a cycle through C++ objects created by
radio.xml:  the |iterator| variable is in the scope that's visible to
|_filterRadioGroup|, which is owned by the iterator.

(I'm thinking somebody should do a memory leak audit of these widgets...)
(Assignee)

Comment 1

13 years ago
Created attachment 176533 [details] [diff] [review]
patch
Attachment #176533 - Flags: superreview?(bryner)
Attachment #176533 - Flags: review?(bryner)
(Assignee)

Updated

13 years ago
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: [patch]
Target Milestone: --- → mozilla1.8beta2
Attachment #176533 - Flags: superreview?(bryner)
Attachment #176533 - Flags: superreview+
Attachment #176533 - Flags: review?(bryner)
Attachment #176533 - Flags: review+
(Assignee)

Comment 2

13 years ago
Fix checked in to trunk, 2005-03-06 20:36 -0800.
Status: ASSIGNED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED

Comment 3

13 years ago
Comment on attachment 176533 [details] [diff] [review]
patch

>+          // XXX The function really should be global instead of local.
Do you mean as per attachment 134317 [details] [diff] [review]'s _filterRadioGroup method?
(Assignee)

Comment 4

13 years ago
(In reply to comment #3)
> (From update of attachment 176533 [details] [diff] [review])
> >+          // XXX The function really should be global instead of local.
> Do you mean as per attachment 134317 [details] [diff] [review]'s _filterRadioGroup method?

Yes.

Comment 5

13 years ago
Created attachment 176576 [details] [diff] [review]
Fix XXX

Updated

13 years ago
Attachment #176576 - Flags: superreview?(dbaron)
Attachment #176576 - Flags: review?(bryner)
(Assignee)

Updated

13 years ago
Attachment #176576 - Flags: superreview?(dbaron) → superreview+
Attachment #176576 - Flags: review?(bryner) → review+

Comment 6

13 years ago
I actually patched revision 1.15 of tookit's radio.xml ;-)

Comment 7

12 years ago
See also bug 323534, "createTreeWalker can cause leaks due to cycles created by closures".
(Assignee)

Comment 8

12 years ago
FWIW, bug 323534 removed the need for this patch.
You need to log in before you can comment on or make changes to this bug.