Closed
Bug 542437
Opened 15 years ago
Closed 15 years ago
Leak nsGlobalWindow with onunload, <video> in <title>
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jruderman, Assigned: roc)
References
Details
(Keywords: memory-leak, testcase)
Attachments
(1 file)
|
408 bytes,
text/html
|
Details |
Dunno if this is related to bug 503989.
| Reporter | ||
Comment 1•15 years ago
|
||
I noticed this because it can entrain nsDocShell.
| Assignee | ||
Updated•15 years ago
|
Assignee: nobody → roc
blocking2.0: --- → ?
| Assignee | ||
Comment 2•15 years ago
|
||
Must be a cycle somewhere. I don't see where though.
Comment 3•15 years ago
|
||
Given that this is something that sites are very unlikely to intentionally run into, I won't be blocking the release on fixing this leak.
| Reporter | ||
Comment 4•15 years ago
|
||
jst, I think roc nominated this bug based on it making it hard to look for *other* leak bugs, not based on the worry that users would hit this one.
| Assignee | ||
Comment 5•15 years ago
|
||
The main thing I'm concerned about is that this leak might be a deeper problem and not just media-related.
| Assignee | ||
Comment 6•15 years ago
|
||
I've tracked it down to nsDocument::DoNotifyPossibleTitleChange being called after nsDocument::Destroy has been called on that document. That calls NS_GetContentList which puts a list in gCachedContentList *after* nsContentList::OnDocumentDestroy has been called on the document, so the list hangs around in gCachedContentList indefinitely, causing the leak.
nsBaseContentList::Shutdown would release gCachedContentList, but that never runs because nsLayoutStatics::Shutdown only runs if all nsGlobalWindows are released, and a window has been entrained somehow. I'm not sure how, though.
| Assignee | ||
Comment 7•15 years ago
|
||
I can easily work around it by having nsDocument::DoNotifyPossibleTitleChange return early if mIsGoingAway, but that doesn't seem like quite the right fix. For one thing, there might be other code that creates a content list for the document. Or we might create a content list for a document that's never belonged to a viewer and won't have nsDocument::Destroy called.
We need to do something about gCachedContentList... perhaps the right thing to do is to actually store one cached list per document and traverse it in cycle collection?
Comment 8•15 years ago
|
||
There is an existing bug about gCachedContentList, bug 523083.
Peterv wanted some other approach to that bug though.
Depends on: 523083
| Assignee | ||
Comment 9•15 years ago
|
||
Right. The patch I prepared for this bug is a lot like your patch in bug 523083.
| Assignee | ||
Updated•15 years ago
|
Whiteboard: [depends on 523083]
| Assignee | ||
Comment 10•15 years ago
|
||
Fixed by checkin for bug 523083.
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Whiteboard: [depends on 523083]
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•