Closed Bug 419038 Opened 17 years ago Closed 17 years ago

Replace nsISupportsArray usage for nsMsgCompose State Listeners

Categories

(MailNews Core :: Composition, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(1 file)

Attached patch The fix (deleted) — Splinter Review
Another step along the road to removing nsISupportsArray. This one replaces the nsISupportsArray handling of state listeners that we have in nsMsgCompose with an nsTObserverArray instead.

Couldn't find a way to test this via xpcshell tests, so no tests with this one.
Attachment #304983 - Flags: superreview?(neil)
Attachment #304983 - Flags: review?(neil)
Comment on attachment 304983 [details] [diff] [review]
The fix

>+  PRInt32 index = mStateListeners.IndexOf(aStateListener);
>+  if (index == -1)
>+    return NS_ERROR_FAILURE;
> 
>+  mStateListeners.RemoveElement(aStateListener);
>+  return NS_OK;
Use RemoveElement ? NS_OK : NS_ERROR_FAILURE as per AppendElement.
Attachment #304983 - Flags: superreview?(neil)
Attachment #304983 - Flags: superreview+
Attachment #304983 - Flags: review?(neil)
Attachment #304983 - Flags: review+
Patch checked in with comment addressed -> fixed.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Summary: Drop replace nsISupportsArray usage for nsMsgCompose State Listeners → Replace nsISupportsArray usage for nsMsgCompose State Listeners
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: