GetRows(getter_AddRefs(rows));
nsresult rv; PRUint32 refIndex; if (aValue == -1) { rv = rows->GetLength(&refIndex); NS_ENSURE_SUCCESS(rv, rv);  if (refIndex == 0) { return NS_OK; }  --refIndex; } else { refIndex = (PRUint32)aValue; }
nsHTMLTableElement::DeleteRow(PRInt32 aValue){  nsCOMPtr<nsIDOMHTMLCollection> rows;  GetRows(getter_AddRefs(rows));  nsCOMPtr<nsIDOMNode> row;  nsresult rv = rows->Item(aValue, getter_AddRefs(row));  NS_ENSURE_SUCCESS(rv, rv);  if (!row) {    return NS_ERROR_DOM_INDEX_SIZE_ERR;  }  nsCOMPtr<nsIDOMNode> parent;  row->GetParentNode(getter_AddRefs(parent));  NS_ENSURE_TRUE(parent, NS_ERROR_UNEXPECTED);  nsCOMPtr<nsIDOMNode> deleted_row;  parent->RemoveChild(row, getter_AddRefs(deleted_row));  return NS_OK;}