mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 845527: Use nsCOMArray::Length() instead of Count() for comparison vs. unsigned index in nsMemoryReporterManager. r=jlebar
This commit is contained in:
parent
5914035e82
commit
a0b3810689
@ -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++;
|
||||
|
Loading…
Reference in New Issue
Block a user