Closed
Bug 233481
Opened 22 years ago
Closed 21 years ago
change nsAutoCompleteMdbResult to use nsCOMArray<nsIMdbRow> instead of nsVoidArray
Categories
(Firefox :: Address Bar, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: patrick, Assigned: patrick)
Details
(Whiteboard: fixed0.9)
Attachments
(1 file, 1 obsolete file)
This bug is inspired by bug 221484 and bug 233479.
I noticed that the internal usage of MdbResult is a void array, so references
to nsIMdbRow objects are not held. This seems dangerous; what if a row were to
be deleted while the MdbResult was still in use?
Coming up is a patch to change this from nsVoidArray to nsCOMArray<nsIMdbRow>.
This removes all the static casts.
Is there a reason why we are not refcounting these objects?
| Assignee | ||
Comment 1•22 years ago
|
||
| Assignee | ||
Updated•22 years ago
|
Attachment #140915 -
Flags: review?(bryner)
Comment 2•22 years ago
|
||
Comment on attachment 140915 [details] [diff] [review]
patch to remove casts in nsAutoCompleteMdbResult.cpp
I can't find anything in the ownership model that would otherwise guarantee
that the row pointers would remain valid, so r=me.
Attachment #140915 -
Flags: review?(bryner) → review+
| Assignee | ||
Updated•22 years ago
|
Attachment #140915 -
Flags: superreview?(firefox)
Updated•22 years ago
|
Attachment #140915 -
Flags: superreview?(firefox) → superreview+
Updated•21 years ago
|
Whiteboard: checkin0.9
Comment 3•21 years ago
|
||
patrick, this patch no longer applies cleanly, can you update to tip and attach
an updated patch?
Whiteboard: checkin0.9
| Assignee | ||
Comment 4•21 years ago
|
||
updated for changes to RemoveRowAt. builds cleanly for me on win32.
Attachment #140915 -
Attachment is obsolete: true
| Assignee | ||
Comment 5•21 years ago
|
||
Comment on attachment 149524 [details] [diff] [review]
updated patch to remove casts in nsAutoCompleteMdbResult.cpp
this is a tiny change (see GetRowAt) for this previously r+sr patch. I'm not
sure if this even needs r+sr, but I'll ask just in case.
Attachment #149524 -
Flags: superreview?(firefox)
Attachment #149524 -
Flags: review?(firefox)
Comment 6•21 years ago
|
||
Comment on attachment 149524 [details] [diff] [review]
updated patch to remove casts in nsAutoCompleteMdbResult.cpp
not necessary in this case, the patch didn't change substantially, its just
bitrot
I'll check this in during my next batch of checkins.
Attachment #149524 -
Flags: superreview?(firefox)
Attachment #149524 -
Flags: review?(firefox)
Updated•21 years ago
|
Whiteboard: checkin0.9
Comment 7•21 years ago
|
||
fixed branch and trunk
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Whiteboard: checkin0.9 → fixed0.9
You need to log in
before you can comment on or make changes to this bug.
Description
•