nsCOMPtr<nsIPresShell> presShell; aPresContext.GetShell(getter_AddRefs(presShell)); nsresult result = NS_NewTableColGroupFrame(presShell, &newFrame);
nsresult result = NS_NewTableColGroupFrame(shell, &newFrame);
nsTableFrame::CreateAnonymousColGroupFrame(nsIPresContext&     aPresContext,                                           nsTableColGroupType aColGroupType){  nsCOMPtr<nsIContent> colGroupContent;  GetContent(getter_AddRefs(colGroupContent));  nsCOMPtr<nsIStyleContext> colGroupStyle;  aPresContext.ResolvePseudoStyleContextFor(colGroupContent,                                            nsHTMLAtoms::tableColGroupPseudo,                                            mStyleContext,                                            PR_FALSE,                                            getter_AddRefs(colGroupStyle));          // Create a col group frame  nsIFrame* newFrame;  nsCOMPtr<nsIPresShell> presShell;  aPresContext.GetShell(getter_AddRefs(presShell));  nsresult result = NS_NewTableColGroupFrame(presShell, &newFrame);  if (NS_SUCCEEDED(result) && newFrame) {    ((nsTableColGroupFrame *)newFrame)->SetType(aColGroupType);    newFrame->Init(&aPresContext, colGroupContent, this, colGroupStyle, nsnull);  }  return (nsTableColGroupFrame *)newFrame;}