Closed
Bug 227780
Opened 21 years ago
Closed 21 years ago
[FIXr]nsCOMArray::ReplaceObjectAt could be safer
Categories
(Core :: XPCOM, defect, P1)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla1.7alpha
People
(Reporter: bzbarsky, Assigned: bzbarsky)
Details
Attachments
(1 file)
1.02 KB,
patch
|
timeless
:
review+
alecf
:
superreview+
|
Details | Diff | Splinter Review |
This function releases the old object before addreffing the new one. If old ==
new and the caller is not holding a ref to it (eg
array.ReplaceObjectAt(array[i], i)) then the object will die.
![]() |
Assignee | |
Comment 1•21 years ago
|
||
![]() |
Assignee | |
Updated•21 years ago
|
Attachment #137026 -
Flags: superreview?(alecf)
Attachment #137026 -
Flags: review?(timeless)
![]() |
Assignee | |
Updated•21 years ago
|
OS: Linux → All
Priority: -- → P1
Hardware: PC → All
Target Milestone: --- → mozilla1.7alpha
Attachment #137026 -
Flags: review?(timeless) → review+
Comment 2•21 years ago
|
||
Comment on attachment 137026 [details] [diff] [review]
Sorta like this-ish
I don't suppose its worth putting another branch in there to avoid the extra
addref/release?
![]() |
Assignee | |
Comment 3•21 years ago
|
||
Probably not. Inserting an object at the same spot should be a rare case, I
would imagine.
Comment 4•21 years ago
|
||
Comment on attachment 137026 [details] [diff] [review]
Sorta like this-ish
ok, I defer to bz's better judgement :)
sr=alecf
Attachment #137026 -
Flags: superreview?(alecf) → superreview+
![]() |
Assignee | |
Updated•21 years ago
|
Summary: [FIX]nsCOMArray::ReplaceObjectAt could be safer → [FIXr]nsCOMArray::ReplaceObjectAt could be safer
![]() |
Assignee | |
Comment 5•21 years ago
|
||
Checked in for 1.7a.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•