Closed Bug 420618 Opened 16 years ago Closed 16 years ago

Improve nsAbDirectoryDataSource and nsSubscribeDataSource ArcLabelsOut functions

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(1 file)

Attached patch The fixSplinter Review
Following on from dwitte's comment in bug 406198, and also the realisation now that we can pre-set an nsCOMArray's size (maybe not on the stack, but at least set it in one go), I think it would be better to change the ArcLabelsOut functions of nsAbDirectoryDataSource and nsSubscribeDataSource to use nsCOMArray rather than nsIMutableArray.

Patch attached.
Attachment #306913 - Flags: superreview?(neil)
Attachment #306913 - Flags: review?(neil)
Comment on attachment 306913 [details] [diff] [review]
The fix

I don't know how long we intend to keep these datasources ;-)

>+    nsCOMArray<nsIRDFResource> array(hasChildren ? 5 : 6);
This is the wrong way around ;-) but I'd just allocate 6 all the time anyway.
Attachment #306913 - Flags: superreview?(neil)
Attachment #306913 - Flags: superreview+
Attachment #306913 - Flags: review?(neil)
Attachment #306913 - Flags: review+
Checked in -> fixed.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: