Closed
Bug 443483
Opened 17 years ago
Closed 16 years ago
Closed windows need two cycle collections to be collected
Categories
(Core :: DOM: Core & HTML, defect, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla1.9.2a1
People
(Reporter: peterv, Assigned: peterv)
Details
(Keywords: fixed1.9.1)
Attachments
(1 file, 1 obsolete file)
3.99 KB,
patch
|
bent.mozilla
:
review+
jst
:
superreview+
jst
:
approval1.9.1+
|
Details | Diff | Splinter Review |
I'm seeing windows stay alive through a cycle collection, even though they really can be collected. The cycle collector even considers them to be white (so they're in a cycle that has no outstanding references). I need to untangle my tree, but I think I have a fix: we're currently not collecting XPCWrappedJS objects that something holds a weak reference too. Fixing that seems to make the closed windows get collected by the next cycle collection.
Assignee | ||
Comment 1•17 years ago
|
||
Also need to collect nsTimeout objects.
Attachment #328030 -
Attachment is obsolete: true
Comment 2•16 years ago
|
||
Still valid, peterv?
Assignee | ||
Comment 3•16 years ago
|
||
Comment on attachment 328322 [details] [diff] [review]
v2
I'd forgotten about this, we should try to get this into 1.9.1.
Attachment #328322 -
Flags: superreview?(jst)
Attachment #328322 -
Flags: review?(bent.mozilla)
Comment on attachment 328322 [details] [diff] [review]
v2
>+ cb.NoteNativeChild(timeout, &NS_CYCLE_COLLECTION_NAME(nsTimeout));
>+ }
>+
>+
Nit: one too many empty lines here.
> NS_IMPL_CYCLE_COLLECTION_ROOT_BEGIN(nsXPCWrappedJS)
>- if(tmp->mRoot && !tmp->mRoot->HasWeakReferences() && tmp->IsValid())
>+ if(tmp->mRoot && tmp->IsValid())
It looks to me like mRoot can only ever be null if we've already called Unlink, in which case I wouldn't think it should be possible to end up in another call to Root. Can you remove that null check too?
r=me.
Attachment #328322 -
Flags: review?(bent.mozilla) → review+
Updated•16 years ago
|
Attachment #328322 -
Flags: superreview?(jst) → superreview+
Assignee | ||
Updated•16 years ago
|
Priority: -- → P2
Target Milestone: mozilla1.9.1a1 → mozilla1.9.2a1
Assignee | ||
Updated•16 years ago
|
Attachment #328322 -
Flags: approval1.9.1?
Assignee | ||
Comment 5•16 years ago
|
||
Comment on attachment 328322 [details] [diff] [review]
v2
This fixes some window leaks that are not shutdown leaks, just windows staying alive too long. Should be fairly safe, especially because it doesn't add unlink code (which is the part of cycle collection that causes the most crashes). Our current test infrastructure only allows us to test for shutdown leaks, so I can't write a test for this. Hopefully that'll change soon with the fix for bug 469779.
Updated•16 years ago
|
Attachment #328322 -
Flags: approval1.9.1? → approval1.9.1+
Assignee | ||
Updated•16 years ago
|
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
•