Closed Bug 28085 Opened 26 years ago Closed 26 years ago

CNavDTD::mBodyContext leaking mStyles

Categories

(Core :: DOM: HTML Parser, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: jrohlf, Assigned: harishd)

References

()

Details

(Keywords: memory-leak)

M13: CNavDTD::CloseContainersTo() calls mBodyContext->Pop() which returns theChildStyleStack. In those situations when theChildStyleStack is passed to RecycleNodes() I believe that it is leaked - the nodes are recycled but the stack itself is leaked. I added the line "delete aNodeStack" to the end of RecycleNodes() which reduced number of leaked stacks from 5 to 1 but I don't know what causes that last one to leak. In general, the code is a bit confusing since nsEntryStack::Push,PushFront,Pop all set mStyles to 0 without first deleting it which at first glance is a leak. However, it appears that Pop() is only called from nsDTDContext::Pop() which grabs and returns mStyles in which case nsEntryStack::Pop() would not leak the mStyles. I don't know if Push(), PushFront() behave similarly to Pop().
Rick, I think I've a fix for this in my tree. Infact, this could be a dup of bug 29048.
Since it's a possible dup of 29048..I'll take this bug...for further analysis.
Assignee: rickg → harishd
I'm pretty sure that this leak has been fixed by my previous change.. Marking bug FIXED.
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Now, am not sure about this fix... Let me reopen this for now.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Fix is in.
Status: REOPENED → RESOLVED
Closed: 26 years ago → 26 years ago
Resolution: --- → FIXED
updated qa contact.
QA Contact: janc → bsharma
Marking verified as per above developer comments.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.