else { lastChild->SetNextSibling(aChild); lastChild = aChild;
if (needPlaceholder) { NS_ASSERTION(frameItems != &aFrameItems, "Putting frame in-flow _and_ want a placeholder?"); nsIFrame* placeholderFrame; nsresult rv = nsCSSFrameConstructor::CreatePlaceholderFrameFor(mPresShell, mPresShell->GetPresContext(), mFrameManager, aContent, aNewFrame, aStyleContext, aParentFrame, &placeholderFrame); if (NS_FAILED(rv)) {     CleanupFrameReferences(mPresShell->GetPresContext(), mFrameManager, aNewFrame); aNewFrame->Destroy(mPresShell->GetPresContext()); return rv; }   aFrameItems.AddChild(placeholderFrame);
nsFrameItems::AddChild(nsIFrame* aChild){  if (childList == nsnull) {    childList = lastChild = aChild;  }  else  {    lastChild->SetNextSibling(aChild);    lastChild = aChild;  }  // if aChild has siblings, lastChild needs to be the last one  for (nsIFrame* sib = lastChild->GetNextSibling(); sib;       sib = sib->GetNextSibling()) {    lastChild = sib;  }}