nsCOMPtr<nsIContent> parent; aCell->GetParent(getter_AddRefs(parent));
nsSelection::GetParentTable(nsIContent *aCell, nsIContent **aTable){  if (!aCell || !aTable) {    return NS_ERROR_NULL_POINTER;  }  nsCOMPtr<nsIContent> parent;  aCell->GetParent(getter_AddRefs(parent));  nsCOMPtr<nsIAtom> tag;  while (parent) {    parent->GetTag(getter_AddRefs(tag));    if (tag == nsHTMLAtoms::table) {      *aTable = parent;      NS_ADDREF(*aTable);      return NS_OK;    }    nsCOMPtr<nsIContent> temp;    parent->GetParent(getter_AddRefs(temp));    parent = temp;  }  return NS_OK;}