nsViewManager::CreateDisplayList leaks hash keys

RESOLVED FIXED

Status

()

RESOLVED FIXED
16 years ago
6 months ago

People

(Reporter: dbaron, Assigned: roc)

Tracking

({memory-leak})

Trunk
memory-leak
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

Loading http://www.w3.org/Style/CSS/ I noticed that
nsViewManager::CreateDisplayList leaks hash keys.  The following line is
misusing the nsHashtable API:

mMapPlaceholderViewToZTreeNode.Put(new nsVoidKey(aView), aResult);

nsHashtable::Put clones the key (and if it weren't deprecated we probably ought
to make it take a |const nsHashKey&|.  The code you really want is:

nsVoidKey key(aView);
mMapPlaceholdeViewToZTreeNode.Put(&key, aResult);
Attachment #129242 - Flags: superreview?(dbaron)
Attachment #129242 - Flags: review?(dbaron)

Comment 3

16 years ago
Isn´t this fixed?
http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/view/src/nsViewManager.cpp
3.300	roc+%cs.cmu.edu	Aug 12 08:56	 	Bug 213303. Allow events to be sent to
views which are totally clipped out. r+sr=dbaron,a=brendan. Patch by
nielsen@memberwebs.com.
3.299	roc+%cs.cmu.edu	Aug 5 18:42	 	Bug 215159. Fix memory leak in
nsViewManager. r+sr=dbaron

Version 3.300 doesn´t fix Bug 213303, must be a typo, as that bug is invalid.
Yeah, I checked this in and forgot to mark FIXED.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
Component: Layout: View Rendering → Layout: Web Painting
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.