Closed
Bug 41695
Opened 24 years ago
Closed 24 years ago
webshells are being leaked on Mac
Categories
(Core :: Layout, defect, P3)
Tracking
()
VERIFIED
FIXED
M16
People
(Reporter: sfraser_bugs, Assigned: sfraser_bugs)
Details
(Keywords: memory-leak, platform-parity, Whiteboard: [nsbeta2+])
We leak at least one webshell per top-level window on Mac. This does not seem to be happening on other platforms. This is causing bugs in editor, and probably elsewhere.
Assignee | ||
Comment 1•24 years ago
|
||
Nominating for nsbeta2, because this can cause a whole suite of bugs, as well as serious memory leaks.
Assignee | ||
Comment 2•24 years ago
|
||
we gotta fix this
Severity: normal → critical
Target Milestone: --- → M16
Assignee | ||
Comment 3•24 years ago
|
||
I'm getting nowhere fast on this one. Help!
Assignee | ||
Comment 5•24 years ago
|
||
Here's one leak: Index: nsParser.cpp =================================================================== RCS file: /cvsroot/mozilla/htmlparser/src/nsParser.cpp,v retrieving revision 3.208 diff -w -c -1 -r3.208 nsParser.cpp *** nsParser.cpp 2000/05/26 19:45:26 3.208 --- nsParser.cpp 2000/06/08 01:24:41 *************** *** 265,267 **** NS_IF_RELEASE(mSink); ! NS_IF_RELEASE(mBundle); --- 265,267 ---- NS_IF_RELEASE(mSink); ! NS_IF_RELEASE(mParserFilter); NS_IF_RELEASE(mBundle);
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•24 years ago
|
||
And another: Index: nsMenuBar.h =================================================================== RCS file: /cvsroot/mozilla/widget/src/mac/nsMenuBar.h,v retrieving revision 1.14 diff -w -c -1 -r1.14 nsMenuBar.h *** nsMenuBar.h 2000/05/26 00:15:28 1.14 --- nsMenuBar.h 2000/06/08 01:25:26 *************** *** 140,143 **** ! nsIWebShell * mWebShell; ! nsIDOMNode * mDOMNode; --- 140,143 ---- ! nsCOMPtr<nsIWebShell> mWebShell; ! nsCOMPtr<nsIDOMNode> mDOMNode; Index: nsMenuBar.cpp =================================================================== RCS file: /cvsroot/mozilla/widget/src/mac/nsMenuBar.cpp,v retrieving revision 1.36 diff -w -c -1 -r1.36 nsMenuBar.cpp *** nsMenuBar.cpp 2000/05/26 00:15:27 1.36 --- nsMenuBar.cpp 2000/06/08 01:25:25 *************** *** 196,201 **** { ! mWebShell = (nsIWebShell*) aWebShell; ! NS_ADDREF(mWebShell); ! mDOMNode = (nsIDOMNode*)menubarNode; ! NS_ADDREF(mDOMNode); --- 196,199 ---- { ! mWebShell = NS_STATIC_CAST(nsIWebShell*, aWebShell); ! mDOMNode = NS_STATIC_CAST(nsIDOMNode*, menubarNode); *************** *** 362,365 **** mIsMenuBarAdded = PR_FALSE; - mWebShell = nsnull; - mDOMNode = nsnull; --- 360,361 ----
Assignee | ||
Comment 7•24 years ago
|
||
With the above fixes, we cease to leak webshells for the browser window. However, mozilla -edit still leaks, but it leaks the nsDocShell + nsWebShellWindow/nsXULWindow for the hidden window, not the editor window. I suspect that menu bar switching is to blame, but this is unclear.
Assignee | ||
Comment 8•24 years ago
|
||
More data points: closing all windows manually, then quitting causes the nsAppShellService to leak (and hence the hidden window).
Assignee | ||
Comment 9•24 years ago
|
||
I'm faily convinced that remaining leakage is because of menus. I see leakage of nsMenus, nsMenuItems, and nsMenubars when doing a simple startup/quit with 1 browser window. Over to you, chris.
Assignee: sfraser → saari
Status: ASSIGNED → NEW
Assignee | ||
Comment 10•24 years ago
|
||
Taking back. I've nailed these suckers...
Assignee: saari → sfraser
Keywords: mlk
Assignee | ||
Comment 11•24 years ago
|
||
I checked in a bunch of changes to the menu code to leak less, and use weak refs where appropriate. Now, we don't leak any webshells on Mac! Yay!
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•