if (!mRangeArray) return NS_ERROR_FAILURE;
nsTypedSelection::AddItem(nsIDOMRange *aItem){  if (!mRangeArray)    return NS_ERROR_FAILURE;  if (!aItem)    return NS_ERROR_NULL_POINTER;  nsresult result;  nsCOMPtr<nsISupports> isupp = do_QueryInterface(aItem, &result);  if (NS_SUCCEEDED(result)) {    result = mRangeArray->AppendElement(isupp);  }  return result;}