Closed Bug 215159 Opened 21 years ago Closed 21 years ago

nsViewManager::CreateDisplayList leaks hash keys

Categories

(Core :: Web Painting, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dbaron, Assigned: roc)

References

()

Details

(Keywords: memory-leak)

Attachments

(1 file)

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);
Attached patch fixSplinter Review
obvious patch
Attachment #129242 - Flags: superreview?(dbaron)
Attachment #129242 - Flags: review?(dbaron)
Attachment #129242 - Flags: superreview?(dbaron)
Attachment #129242 - Flags: superreview+
Attachment #129242 - Flags: review?(dbaron)
Attachment #129242 - Flags: review+
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
Closed: 21 years ago
Resolution: --- → FIXED
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: