if (child) {   return HandleChild(aPresContext, aMetrics, aReflowState, aStatus, child);
else rv = ReinstantiatePlugin(aPresContext, aMetrics, aReflowState);   if(rv == NS_OK) { aStatus = NS_FRAME_COMPLETE; return NS_OK;
nsObjectFrame::Reflow(nsPresContext*           aPresContext,                      nsHTMLReflowMetrics&     aMetrics,                      const nsHTMLReflowState& aReflowState,                      nsReflowStatus&          aStatus){  DO_GLOBAL_REFLOW_COUNT("nsObjectFrame", aReflowState.reason);  DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);  nsresult rv = NS_OK;  // If we have a child, we toss the reflow over to it.  nsIFrame * child = mFrames.FirstChild();  if (IsBroken()) {    // This is a broken plugin, if we don't already have a child    // frame, create the child frames manually. If any of this frame    // construction code ever changes to use the frame constructor, or    // any other change, this probably needs some changes too.    if (!child) {      CreateDefaultFrames(aPresContext, aMetrics, aReflowState);      child = mFrames.FirstChild();    }    if (child) {      GetDesiredSize(aPresContext, aReflowState, aMetrics);      // Build a reflow state so we can see what the child's border and      // padding are going to be      nsHTMLReflowState state(aPresContext, aReflowState, child,                              nsSize(aReflowState.availableWidth,                                     aReflowState.availableHeight));      float t2p = aPresContext->TwipsToPixels();      PRInt32 width = NSTwipsToIntPixels(aMetrics.width - state.mComputedBorderPadding.LeftRight(), t2p);      PRInt32 height = NSTwipsToIntPixels(aMetrics.height - state.mComputedBorderPadding.TopBottom(), t2p);      // Set the child's content width and height      SizeAnchor(child->GetContent(), width, height);      // SizeAnchor() is seriously evil as it ends up setting an      // attribute (through the style changes that it does) while      // we're in reflow. This is also seriously evil, as it pulls      // that reflow command out of the reflow queue, as leaving it      // there can get us into infinite loops while reflowing object      // frames for missing plugins.      nsReflowType reflowType(eReflowType_StyleChanged);      aPresContext->PresShell()->CancelReflowCommand(child, &reflowType);    }  }  if (child) {    // Reflow the child; our size just depends on that of the child,    // pure and simple    return HandleChild(aPresContext, aMetrics, aReflowState, aStatus, child);  }  // Get our desired size  GetDesiredSize(aPresContext, aReflowState, aMetrics);  // delay plugin instantiation until all children have  // arrived. Otherwise there may be PARAMs or other stuff that the  // plugin needs to see that haven't arrived yet.  if (!GetContent()->IsDoneAddingChildren()) {    aStatus = NS_FRAME_COMPLETE;    return rv;  }  // if we are printing or print previewing, bail for now  if (aPresContext->Medium() == nsLayoutAtoms::print) {    aStatus = NS_FRAME_COMPLETE;    return rv;  }  FixupWindow(nsSize(aMetrics.width, aMetrics.height));  aStatus = NS_FRAME_COMPLETE;  NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aMetrics);  return rv;}