blockSections->RemoveElementAt(0); subRange = (nsIDOMRange *)(blockSections->ElementAt(0));
nsHTMLEditor::RemoveParentFromRange(const nsString &aParentTag, nsIDOMRange *aRange){  if (!aRange) { return NS_ERROR_NULL_POINTER; }  nsresult res;  nsISupportsArray *blockSections;  res = NS_NewISupportsArray(&blockSections);  if (NS_FAILED(res)) return res;  if (!blockSections) return NS_ERROR_NULL_POINTER;  res = GetBlockSectionsForRange(aRange, blockSections);  if (NS_SUCCEEDED(res))   {    nsIDOMRange *subRange;    subRange = (nsIDOMRange *)(blockSections->ElementAt(0));    while (subRange && (NS_SUCCEEDED(res)))    {      res = RemoveParentFromBlockContent(aParentTag, subRange);      NS_RELEASE(subRange);      if (NS_FAILED(res))      {        break;      }      blockSections->RemoveElementAt(0);      subRange = (nsIDOMRange *)(blockSections->ElementAt(0));    }  }  NS_RELEASE(blockSections);  return res;}