Closed
Bug 339477
Opened 19 years ago
Closed 19 years ago
tabbrowser.xml's observer destructor never gets called, leaking mTabClipWidth at shutdown
Categories
(Firefox :: Tabbed Browser, defect)
Firefox
Tabbed Browser
Tracking
()
RESOLVED
FIXED
Firefox 2 beta1
People
(Reporter: ispiked, Assigned: ispiked)
References
()
Details
(Keywords: fixed1.8.1, memory-leak)
Attachments
(1 file, 1 obsolete file)
1.64 KB,
patch
|
mconnor
:
review+
mconnor
:
approval-branch-1.8.1+
|
Details | Diff | Splinter Review |
Found this using dbaron's leak monitor extension.
Steps to reproduce:
1. Install the extension.
2. Start Firefox; close Firefox.
Results:
On shutdown, the following is printed to the console:
LeakReport:
[+] [leaked object] (8671950) = [object XULElement @ 0x86907d0 (native @ 0x86a4830)]
[ ] mTabClipWidth = 140
Expected results:
No leak.
I put some dumps in the destructor and found that it's never called. This can be solved my making the addObserver call to the pref. hold a weak reference to the observer, but I don't know what the possible side effects of this are.
Comment 1•19 years ago
|
||
I'm curious why the destructor isn't being called, but in the absence of a good reason, the weak ref is perfectly acceptable.
Updated•19 years ago
|
Flags: blocking-firefox2+
Target Milestone: --- → Firefox 2 beta1
Assignee | ||
Comment 2•19 years ago
|
||
Comment 3•19 years ago
|
||
Comment on attachment 223702 [details] [diff] [review]
hold weak ref. to observer
If we're holding the weak ref, just drop the removeObserver call and I guess the whole destructor
Attachment #223702 -
Flags: review?(mconnor) → review-
Assignee | ||
Comment 4•19 years ago
|
||
OK. I had a feeling I should do that, but I wasn't sure.
Attachment #223702 -
Attachment is obsolete: true
Attachment #223705 -
Flags: review?(mconnor)
Attachment #223705 -
Flags: approval-branch-1.8.1?(mconnor)
Updated•19 years ago
|
Attachment #223705 -
Flags: review?(mconnor)
Attachment #223705 -
Flags: review+
Attachment #223705 -
Flags: approval-branch-1.8.1?(mconnor)
Attachment #223705 -
Flags: approval-branch-1.8.1+
Assignee | ||
Updated•19 years ago
|
Whiteboard: [checkin needed]
Comment 5•19 years ago
|
||
Patch landed on trunk and 1_8 branch
U toolkit/content/widgets/tabbrowser.xml
RCS file: /cvsroot/mozilla/toolkit/content/widgets/tabbrowser.xml,v
retrieving revision 1.149
retrieving revision 1.150
Checking in toolkit/content/widgets/tabbrowser.xml;
/cvsroot/mozilla/toolkit/content/widgets/tabbrowser.xml,v <-- tabbrowser.xml
new revision: 1.103.2.42; previous revision: 1.103.2.41
Whiteboard: [checkin needed]
Assignee | ||
Updated•19 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
OS: Linux → All
Hardware: PC → All
Resolution: --- → FIXED
Comment 6•19 years ago
|
||
see also bug #340547, which contains a supplimental patch for this issue
Updated•19 years ago
|
Keywords: fixed1.8.1
You need to log in
before you can comment on or make changes to this bug.
Description
•