Closed Bug 237262 Opened 21 years ago Closed 21 years ago

nsAttrAndChildArray::ReplaceChildAt() should addref before releasing

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jwkbugzilla, Assigned: jwkbugzilla)

Details

Attachments

(1 file)

nsAttrAndChildArray::ReplaceChildAt() makes NS_RELEASE for the old value before doing NS_ADDREF for the new one - it should be the other way round just in case both are the same object (that's how nsCOMArray does it for example).
Attached patch Proposed patchSplinter Review
Attachment #143714 - Flags: review?(bugmail)
Status: NEW → ASSIGNED
Comment on attachment 143714 [details] [diff] [review] Proposed patch looks good to me
Attachment #143714 - Flags: review?(bugmail) → review+
Comment on attachment 143714 [details] [diff] [review] Proposed patch sr=bzbarsky. That's what the old ReplaceChildAt code did...
Attachment #143714 - Flags: superreview+
Comment on attachment 143714 [details] [diff] [review] Proposed patch I think this is worth getting into beta....
Attachment #143714 - Flags: approval1.7b?
Attachment #143714 - Flags: approval1.7b? → approval1.7b+
checked in 03/12/2004 17:17
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Component: DOM: Core → DOM: Core & HTML
QA Contact: ian → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: