ne...@parkwaycc.co.uk <
ne...@httl.net> has granted Mark Banner (:standard8)
<
mba...@mozilla.com>'s request for superreview:
------- Additional Comments from
ne...@parkwaycc.co.uk <
ne...@httl.net>
>+ nsresult rv = m_identities->IndexOf(0, aDefaultIdentity, &position);
>+ NS_ENSURE_TRUE(rv != NS_ERROR_FAILURE, NS_ERROR_UNEXPECTED);
Surely NS_ENSURE_SUCCESS(rv, rv); suffices?
>+ if (existingIdentitiesArray->IndexOf(0, identity, &pos) !=
NS_ERROR_FAILURE)
NS_SUCCEEDED() and similarly for any others I missed. r=me with those fixed.
>+nsMsgAccountManager::GetAllIdentities(nsIArray **_retval)
Bah, if only there was a way of telling which elements of m_identities were
still active.
>+ NS_IF_ADDREF(*_retval = result);
result.forget(_retval);
> NS_IMETHODIMP
> nsMsgAccountManager::GetIdentitiesForServer(nsIMsgIncomingServer *server,
>- nsISupportsArray **_retval)
>+ nsIArray **_retval)
> {
...
>+ if (serverKey.Equals(thisServerKey))
>+ {
>+ nsCOMPtr<nsIArray> theseIdentities;
>+ rv = account->GetIdentities(getter_AddRefs(theseIdentities));
Since this is an nsIArray, do we still need to copy it?
> // convert supports->Identity
>- nsCOMPtr<nsISupports> thisSupports;
>- rv = identities->GetElementAt(i, getter_AddRefs(thisSupports));
>- if (NS_FAILED(rv)) continue;
>-
>- nsCOMPtr<nsIMsgIdentity> thisIdentity = do_QueryInterface(thisSupports,
&rv);
>-
>+ nsCOMPtr<nsIMsgIdentity> thisIdentity(do_QueryElementAt(identities, i,
&rv));
Comment no longer makes sense.
>diff --git a/mailnews/base/src/nsSpamSettings.cpp
b/mailnews/base/src/nsSpamSettings.cpp
...
>+#include "nsIMutableArray.h"
Does nsIArray not suffice?
>diff --git a/mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp
b/mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp
...
>+#include "nsIMutableArray.h"
[Same again]