PRUint32 cnt; nsresult rv = mDomSelection->mRangeArray->Count(&cnt); if (NS_FAILED(rv)) return rv; if (mIndex >= 0 && mIndex < (PRInt32)cnt ) {
PRInt32 cnt = mDomSelection->mRangeArray.Count(); if (mIndex >= 0 && mIndex < cnt) {
nsSelectionIterator::IsDone(){  PRUint32 cnt;  nsresult rv = mDomSelection->mRangeArray->Count(&cnt);  if (NS_FAILED(rv)) return rv;  if (mIndex >= 0 && mIndex < (PRInt32)cnt ) {     return NS_ENUMERATOR_FALSE;  }  return NS_OK;}