PRUint32 cnt; nsresult rv = mDomSelection->mRangeArray->Count(&cnt); if (NS_FAILED(rv)) return rv; mIndex = (PRInt32)cnt-1;
mIndex = mDomSelection->mRangeArray.Count() - 1;
nsSelectionIterator::Last(){  if (!mDomSelection)    return NS_ERROR_NULL_POINTER;  PRUint32 cnt;  nsresult rv = mDomSelection->mRangeArray->Count(&cnt);  if (NS_FAILED(rv)) return rv;  mIndex = (PRInt32)cnt-1;  return NS_OK;}