Closed
Bug 404492
Opened 17 years ago
Closed 17 years ago
Remove nsISupportsArray usage from nsIAbBooleanExpression
Categories
(MailNews Core :: Address Book, defect)
MailNews Core
Address Book
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: standard8, Assigned: standard8)
References
Details
Attachments
(2 files, 2 obsolete files)
(deleted),
patch
|
neil
:
review+
neil
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Details | Diff | 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)
Assignee | ||
Comment 1•17 years ago
|
||
Comment 2•17 years ago
|
||
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-
Assignee | ||
Comment 3•17 years ago
|
||
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)
Assignee | ||
Comment 4•17 years ago
|
||
Comment 5•17 years ago
|
||
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+
Assignee | ||
Comment 6•17 years ago
|
||
Patch checked in with nits addressed -> fixed.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•