Bug 845527: Use nsCOMArray::Length() instead of Count() for comparison vs. unsigned index in nsMemoryReporterManager. r=jlebar

This commit is contained in:
Daniel Holbert 2013-02-26 14:25:38 -08:00
parent 5914035e82
commit a0b3810689

View File

@ -798,15 +798,17 @@ HashtableEnumerator::EnumeratorFunc(nsISupportsHashKey* aElem, void* aData)
return PL_DHASH_NEXT;
}
NS_IMETHODIMP HashtableEnumerator::HasMoreElements(bool* aResult)
NS_IMETHODIMP
HashtableEnumerator::HasMoreElements(bool* aResult)
{
*aResult = mIndex < mArray.Count();
*aResult = mIndex < mArray.Length();
return NS_OK;
}
NS_IMETHODIMP HashtableEnumerator::GetNext(nsISupports** aNext)
NS_IMETHODIMP
HashtableEnumerator::GetNext(nsISupports** aNext)
{
if (mIndex < mArray.Count()) {
if (mIndex < mArray.Length()) {
nsCOMPtr<nsISupports> next = mArray.ObjectAt(mIndex);
next.forget(aNext);
mIndex++;