Closed
Bug 61471
Opened 24 years ago
Closed 24 years ago
big leak main nsXULDocument if sidebar is closed
Categories
(Core :: XUL, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla0.8
People
(Reporter: dbaron, Assigned: hyatt)
References
Details
(Keywords: memory-leak, regression)
Attachments
(2 files)
22.73 KB,
text/plain
|
Details | |
530 bytes,
patch
|
Details | Diff | Splinter Review |
If I have my sidebar closed (View | My Sidebar), and start Mozilla and exit, it
leaks the main nsXULDocument (around 850K). If the sidebar is open, this
doesn't happen.
This is a regression sometime since Sunday, when I last pulled. The only reason
it didn't show up on tinderbox is that I assume tinderbox runs the tests with
the sidebar open (the default).
Reporter | ||
Updated•24 years ago
|
Keywords: mlk,
regression
Updated•24 years ago
|
Summary: leak main nsXULDocument if sidebar is closed → big leak main nsXULDocument if sidebar is closed
Reporter | ||
Comment 2•24 years ago
|
||
Comment 3•24 years ago
|
||
->pavlov, p1/moz0.8. cc bryner
Assignee: trudelle → pavlov
Priority: P3 → P1
Target Milestone: --- → mozilla0.8
Reporter | ||
Comment 4•24 years ago
|
||
The two leaked nsXPCWrappedNative roots were both created within
nsXBLBinding::InstallProperties
Assignee | ||
Comment 5•24 years ago
|
||
Let's narrow down the checkin to a specific day. It's probably someone changing
some XBL to create a cycle. Look for checkins to XML files on the day the leak
began.
Reporter | ||
Comment 6•24 years ago
|
||
We should test if jag's checkin for bug 61886 did anything to help this:
http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=mozilla/xpfe/browser/resources/content&command=DIFF_FRAMESET&file=navigator.js&rev1=1.261&rev2=1.262&root=/cvsroot
Reporter | ||
Comment 7•24 years ago
|
||
Nope, didn't help.
Reporter | ||
Comment 8•24 years ago
|
||
The bug did exist at 2000-11-28 08:00 PST.
Reporter | ||
Comment 9•24 years ago
|
||
FWIW, the leak seems to depend on the state of the sidebar when the window is
closed, rather than the state when the window is opened.
Reporter | ||
Comment 10•24 years ago
|
||
This bug did exist at 2000-11-27 08:00 PST.
Reporter | ||
Comment 11•24 years ago
|
||
This bug did exist at 2000-11-26 08:00 PST.
Reporter | ||
Comment 12•24 years ago
|
||
This bug did NOT exist at 2000-11-24 08:00 PST.
Reporter | ||
Comment 13•24 years ago
|
||
This leak was triggered by jag's checkin moving navigator.js from revision 1.255
to revision 1.257.
Reporter | ||
Comment 14•24 years ago
|
||
Comment 15•24 years ago
|
||
With much help from dbaron. Thanks!
So it appears xbl properties (sometimes?) leak when they refer to eachother,
like in this case, where webNavigation refers to this.docShell:
<property name="docShell" readonly="true"
onget="return this.boxObject
.QueryInterface(Components.interfaces.nsIBrowserBoxObject)
.docShell;"/>
<property name="webNavigation" readonly="true"
onget="return this.docShell
.QueryInterface(Components.interfaces.nsIWebNavigation);"/>
This seems to be the same cause of the leak in bug 61821 for which a similar
work-around was provided.
Comment 16•24 years ago
|
||
hyatt, can you attach that JSPROP_SHARED patch from your tree? If so, jag
please test it: it may help here.
/be
Assignee | ||
Updated•24 years ago
|
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 18•24 years ago
|
||
fixed w the shared thing i already added
Comment 19•24 years ago
|
||
Yep, seems fixed.
David, can you verify?
Comment 20•24 years ago
|
||
Actually, this is back with a vengeance.
If I start Mozilla with the sidebar closed, and load ftp://ftp.mozilla.org, I
still leak.
Apparantly, opening the sidebar (or having it open to begin with) makes the leak
hide somewhere.
David, I recall you saying something similar for another leak? "browsing for a
while makes the leak go away"...
Comment 21•24 years ago
|
||
Can someone say more about how to reproduce the leak jag says is "back with a
vengeance"?
Hyatt taught XBL to use JSPROP_SHARED for getters and setters, eliminating major
garbage entrainment. I believe that attribute was responsible for the verified
fix where getBrowser().webNavigation used to leak, and after the JSPROP_SHARED
patch was checked in, did not.
(My belief is based on the workaround jag found, which dbaron attached to this
bug: that workaround inline-expanded the gette r for webNavigation, replacing a
property get with a function call. Function calls return values via the JS
stack, which is then popped; without JSPROP_SHARED, getters return values the
same way but cache the last r.v. in the property's slot, entraining potential
garbage. JSPROP_SHARED eliminates the slot-cache entirely.)
If the symptom is back, it must be for a different reason, now that XBL uses
JSPROP_SHARED. Should a new bug be opened?
/be
You need to log in
before you can comment on or make changes to this bug.
Description
•