Closed Bug 61471 Opened 24 years ago Closed 24 years ago

big leak main nsXULDocument if sidebar is closed

Categories

(Core :: XUL, defect, P1)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla0.8

People

(Reporter: dbaron, Assigned: hyatt)

References

Details

(Keywords: memory-leak, regression)

Attachments

(2 files)

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).
Could this be something like bug 60729?
Summary: leak main nsXULDocument if sidebar is closed → big leak main nsXULDocument if sidebar is closed
->pavlov, p1/moz0.8. cc bryner
Assignee: trudelle → pavlov
Priority: P3 → P1
Target Milestone: --- → mozilla0.8
The two leaked nsXPCWrappedNative roots were both created within nsXBLBinding::InstallProperties
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.
Blocks: 32148
The bug did exist at 2000-11-28 08:00 PST.
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.
This bug did exist at 2000-11-27 08:00 PST.
This bug did exist at 2000-11-26 08:00 PST.
This bug did NOT exist at 2000-11-24 08:00 PST.
This leak was triggered by jag's checkin moving navigator.js from revision 1.255 to revision 1.257.
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.
hyatt, can you attach that JSPROP_SHARED patch from your tree? If so, jag please test it: it may help here. /be
yup
Assignee: pavlov → hyatt
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
fixed w the shared thing i already added
Yep, seems fixed. David, can you verify?
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"...
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.

Attachment

General

Created:
Updated:
Size: