Closed Bug 404492 Opened 17 years ago Closed 17 years ago

Remove nsISupportsArray usage from nsIAbBooleanExpression

Categories

(MailNews Core :: Address Book, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(2 files, 2 obsolete files)

Attached patch The fix (diff -w) (obsolete) (deleted) — Splinter Review
nsISupportsArray is obsolete and should be replaced. This bug is for the current nsIAbBooleanExpression usage. Patch attached replaces with an nsIArray, and does the associated changes/removals. Also removes some more obsolete nsISupportsArray includes.
Attachment #289470 - Flags: superreview?(neil)
Attachment #289470 - Flags: review?(neil)
Attached patch The fix (normal patch) (obsolete) (deleted) — Splinter Review
Comment on attachment 289470 [details] [diff] [review] The fix (diff -w) >- attribute nsISupportsArray expressions; >+ attribute nsIArray expressions; Unfortunately you didn't fix all the users, e.g. nsAbOutlookDirectory > if (!mExpressions) >- NS_NewISupportsArray(getter_AddRefs(mExpressions)); >+ mExpressions = do_CreateInstance(NS_ARRAY_CONTRACTID); > if (!mExpressions) >- NS_NewISupportsArray(getter_AddRefs(mExpressions)); >+ { >+ mExpressions = do_CreateInstance(NS_ARRAY_CONTRACTID); >+ if (!mExpressions) >+ return NS_ERROR_OUT_OF_MEMORY; >+ } Inconsistent (especially as the next statement is NS_IF_ADDREF...)
Attachment #289470 - Flags: superreview?(neil)
Attachment #289470 - Flags: superreview-
Attachment #289470 - Flags: review?(neil)
Attachment #289470 - Flags: review-
Attached patch The fix v2 (diff -w) (deleted) — Splinter Review
Fixed the missed files and the inconsistency.
Attachment #289470 - Attachment is obsolete: true
Attachment #289471 - Attachment is obsolete: true
Attachment #289843 - Flags: superreview?(neil)
Attachment #289843 - Flags: review?(neil)
Attached patch The fix v2 (normal patch) (deleted) — Splinter Review
Comment on attachment 289843 [details] [diff] [review] The fix v2 (diff -w) > if (!mExpressions) >- NS_NewISupportsArray(getter_AddRefs(mExpressions)); >+ { >+ mExpressions = do_CreateInstance(NS_ARRAY_CONTRACTID); >+ if (!mExpressions) >+ return NS_ERROR_OUT_OF_MEMORY; >+ } > > NS_IF_ADDREF(*aExpressions = mExpressions); Nit: You didn't fix this NS_IF_ADDREF to NS_ADDREF >+ condition = do_QueryElementAt(expressions, i, &retCode)); Erroneous ).
Attachment #289843 - Flags: superreview?(neil)
Attachment #289843 - Flags: superreview+
Attachment #289843 - Flags: review?(neil)
Attachment #289843 - Flags: review+
Patch checked in with nits addressed -> fixed.
Status: NEW → RESOLVED
Closed: 17 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: