bug 819940 - remove nsISupportsArray::EnumerateBackwards() r=ehsan

This commit is contained in:
Trevor Saunders 2012-12-09 13:40:46 -05:00
parent 706ed64c15
commit 6b25120b4e
3 changed files with 1 additions and 17 deletions

View File

@ -40,7 +40,7 @@ NS_NewArrayEnumerator(nsISimpleEnumerator* *result,
nsISupportsArray* array);
%}
[scriptable, uuid(791eafa0-b9e6-11d1-8031-006008159b5a)]
[scriptable, uuid(2d375c0f-8a34-4397-bea1-ab4d6beae0ab)]
interface nsISupportsArray : nsICollection {
[notxpcom] boolean Equals([const] in nsISupportsArray other);
@ -77,9 +77,6 @@ interface nsISupportsArray : nsICollection {
[notxpcom, noscript]
boolean EnumerateForwards(in nsISupportsArrayEnumFunc aFunc,
in voidPtr aData);
[notxpcom, noscript]
boolean EnumerateBackwards(in nsISupportsArrayEnumFunc aFunc,
in voidPtr aData);
nsISupportsArray clone();

View File

@ -583,18 +583,6 @@ nsSupportsArray::EnumerateForwards(nsISupportsArrayEnumFunc aFunc, void* aData)
return running;
}
NS_IMETHODIMP_(bool)
nsSupportsArray::EnumerateBackwards(nsISupportsArrayEnumFunc aFunc, void* aData)
{
uint32_t aIndex = mCount;
bool running = true;
while (running && (0 < aIndex--)) {
running = (*aFunc)(mArray[aIndex], aData);
}
return running;
}
NS_IMETHODIMP
nsSupportsArray::Enumerate(nsIEnumerator* *result)
{

View File

@ -106,7 +106,6 @@ public:
NS_IMETHOD Compact(void);
NS_IMETHOD_(bool) EnumerateForwards(nsISupportsArrayEnumFunc aFunc, void* aData);
NS_IMETHOD_(bool) EnumerateBackwards(nsISupportsArrayEnumFunc aFunc, void* aData);
NS_IMETHOD Clone(nsISupportsArray **_retval);