nsCOMPtr<nsIContent>content; result = cellFrame->GetContent(getter_AddRefs(content)); if (NS_SUCCEEDED(result) && content) { content->QueryInterface(NS_GET_IID(nsIDOMElement), (void**)(&aCell)); }  return result;
nsIContent* content = cellFrame->GetContent(); if (!content) return NS_ERROR_FAILURE;  return CallQueryInterface(content, &aCell);
nsTableFrame::GetCellDataAt(PRInt32        aRowIndex,                             PRInt32        aColIndex,                            nsIDOMElement* &aCell,   //out params                            PRInt32&       aStartRowIndex,                             PRInt32&       aStartColIndex,                             PRInt32&       aRowSpan,                             PRInt32&       aColSpan,                            PRInt32&       aActualRowSpan,                             PRInt32&       aActualColSpan,                            PRBool&        aIsSelected){  // Initialize out params  aCell = nsnull;  aStartRowIndex = 0;  aStartColIndex = 0;  aRowSpan = 0;  aColSpan = 0;  aIsSelected = PR_FALSE;  nsTableCellMap* cellMap = GetCellMap();  if (!cellMap) { return NS_ERROR_NOT_INITIALIZED;}  PRBool originates;  PRInt32 colSpan; // Is this the "effective" or "html" value?  nsTableCellFrame *cellFrame = cellMap->GetCellInfoAt(aRowIndex, aColIndex, &originates, &colSpan);  if (!cellFrame) return NS_TABLELAYOUT_CELL_NOT_FOUND;  nsresult result= cellFrame->GetRowIndex(aStartRowIndex);  if (NS_FAILED(result)) return result;  result = cellFrame->GetColIndex(aStartColIndex);  if (NS_FAILED(result)) return result;  //This returns HTML value, which may be 0  aRowSpan = cellFrame->GetRowSpan();  aColSpan = cellFrame->GetColSpan();  aActualRowSpan = GetEffectiveRowSpan(*cellFrame);  aActualColSpan = GetEffectiveColSpan(*cellFrame);  result = cellFrame->GetSelected(&aIsSelected);  if (NS_FAILED(result)) return result;  // do this last, because it addrefs,   // and we don't want the caller leaking it on error  nsCOMPtr<nsIContent>content;  result = cellFrame->GetContent(getter_AddRefs(content));    if (NS_SUCCEEDED(result) && content)  {    content->QueryInterface(NS_GET_IID(nsIDOMElement), (void**)(&aCell));  }                                             return result;}