if (aCmdType != NULL) {  nsIReflowCommand::ReflowType type; if (NS_SUCCEEDED(rc->GetType(type))) { if (type != *aCmdType) continue; } }
PresShell::CancelReflowCommand(nsIFrame* aTargetFrame){  PRInt32 i, n = mReflowCommands.Count();  for (i = 0; i < n; i++) {    nsIReflowCommand* rc = (nsIReflowCommand*) mReflowCommands.ElementAt(i);    if (rc) {      nsIFrame* target;      if (NS_SUCCEEDED(rc->GetTarget(target))) {        if (target == aTargetFrame) {#ifdef DEBUG          if (VERIFY_REFLOW_NOISY_RC & gVerifyReflowFlags) {            printf("PresShell: removing rc=%p for frame ", rc);            nsFrame::ListTag(stdout, aTargetFrame);            printf("\n");          }#endif          mReflowCommands.RemoveElementAt(i);          NS_RELEASE(rc);          n--;          i--;          continue;        }      }    }  }  return NS_OK;}