Closed Bug 609560 Opened 11 years ago Closed 10 years ago

Leak nsGlobalWindow with iframes, expando property on attr node

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jruderman, Unassigned)

Details

(Keywords: memory-leak, testcase)

Attachments

(1 file)

trace-refcnt reports leaks of {nsDocShell, nsDocument, nsGlobalWindow}.
Attachment #488152 - Attachment description: testcase → testcase (must be local)
Hmm.  We do traverse through the nsDOMAttributeMap during CC, and nsGenericElement::Unlink drops its reference to the map...

So that should break the obvious cycle here, I'd think.
I'm still trying to figure this out, but it looks like there's a cycle with a docshell involved and docshells don't participate in CC. But there must be more to it. I haven't found out exactly why removing the cycle between the attribute and its wrapper makes the leak disappear, since all the other cycles should be enough to leak too. A key seems to be that the parent of the attribute's wrapper is the document, which holds the attribute's ownerElement through inner window -> outer window -> frame element.
WFM on trunk.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Crashtest: http://hg.mozilla.org/mozilla-central/rev/8909195f37cf
Flags: in-testsuite+
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.