nsIFrame* childFrame; frame->FirstChild(aPresContext, nsnull, &childFrame);
nsIFrame* childFrame = frame->GetFirstChild(nsnull);
DoCleanupFrameReferences(nsIPresContext*  aPresContext,                         nsIFrameManager* aFrameManager,                         nsIFrame*        aFrameIn){  nsIContent* content = aFrameIn->GetContent();  nsIFrame* frame = aFrameIn;  // if the frame is a placeholder use the out of flow frame  if (nsLayoutAtoms::placeholderFrame == aFrameIn->GetType()) {    frame = ((nsPlaceholderFrame*)frame)->GetOutOfFlowFrame();    NS_ASSERTION(frame, "program error - null of of flow frame in placeholder");  }  // Remove the mapping from the content object to its frame  aFrameManager->SetPrimaryFrameFor(content, nsnull);  frame->RemovedAsPrimaryFrame(aPresContext);  aFrameManager->ClearAllUndisplayedContentIn(content);  // Recursively walk the child frames.  // Note: we only need to look at the principal child list  nsIFrame* childFrame;  frame->FirstChild(aPresContext, nsnull, &childFrame);  while (childFrame) {    DoCleanupFrameReferences(aPresContext, aFrameManager, childFrame);        // Get the next sibling child frame    childFrame = childFrame->GetNextSibling();  }}