Closed
Bug 158066
Opened 22 years ago
Closed 17 years ago
Potential leak of window object because of self-cycle with opener
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla1.9beta3
People
(Reporter: keeda, Assigned: smaug)
References
Details
(Keywords: memory-leak, testcase)
Attachments
(2 files)
300 bytes,
text/html
|
Details | |
1.10 KB,
patch
|
peterv
:
review+
peterv
:
superreview+
|
Details | Diff | Splinter Review |
Here is another one of my "strange case" leak reports. The testcase that I am about to to attach will cause mozilla to leak a GlobalWindow object. What is happening here is that the GlobalWindow holds on to a strong ref to its opener nsCOMPtr<nsIDOMWindowInternal> mOpener; But the opener can potentially be itself. So it end up having a ref to itself and leaking. Everything that it owns goes with it. I dunno how you are going to fix this, or if it is even worth fixing :-/
Reporter | ||
Comment 1•22 years ago
|
||
err .. sorry ... typo in summary.
Summary: Pothential leak of window object because of self-cycle with opener → Potential leak of window object because of self-cycle with opener
Reporter | ||
Comment 2•22 years ago
|
||
Comment 3•22 years ago
|
||
nice.... Would it be possible to use something similar to create a loop with more than one window in it? Or do we just need to deal with the foo.opener == foo case?
Comment 4•22 years ago
|
||
Just did some testing with that testcase. It doesn't leak any webshells, which makes it leaking a window seem unlikely....
Reporter | ||
Comment 5•22 years ago
|
||
Yeah. Its not as bad as I initially thought. We end up realeasing most (probably all) of the stuff that the window holds since SetDocShell(null) does get called. But we do leak the GlobalWindow object itself.
Comment 7•17 years ago
|
||
I see a nsGlobalWindow leak with the testcase, using Mac trunk debug.
Flags: blocking1.9?
Assignee | ||
Comment 8•17 years ago
|
||
The comment that was there is: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/dom/src/base/nsGlobalWindow.cpp&rev=1.899&mark=679-684,735,736#672 Need to test if there still are some problems...
Assignee | ||
Comment 9•17 years ago
|
||
Comment on attachment 292303 [details] [diff] [review] possible patch I run mochitest with many windows open and there weren't any problems.
Attachment #292303 -
Flags: superreview?(peterv)
Attachment #292303 -
Flags: review?(peterv)
Updated•17 years ago
|
Flags: blocking1.9? → blocking1.9+
Priority: -- → P3
Comment 10•17 years ago
|
||
Comment on attachment 292303 [details] [diff] [review] possible patch Does it fix this bug?
Assignee | ||
Comment 11•17 years ago
|
||
sure :)
Updated•17 years ago
|
Attachment #292303 -
Flags: superreview?(peterv)
Attachment #292303 -
Flags: superreview+
Attachment #292303 -
Flags: review?(peterv)
Attachment #292303 -
Flags: review+
Assignee | ||
Comment 12•17 years ago
|
||
Checked in
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Updated•17 years ago
|
Target Milestone: --- → mozilla1.9 M11
Updated•17 years ago
|
Flags: in-testsuite?
Assignee | ||
Updated•17 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Updated•17 years ago
|
Assignee: general → Olli.Pettay
Status: REOPENED → NEW
Assignee | ||
Updated•17 years ago
|
Status: NEW → RESOLVED
Closed: 17 years ago → 17 years ago
Resolution: --- → FIXED
Component: DOM: Core → DOM: Core & HTML
QA Contact: stummala → general
You need to log in
before you can comment on or make changes to this bug.
Description
•