n = mTimeoutReflowCommands.Count(); for (i = 0; i < n; i++) { rc = NS_STATIC_CAST(nsHTMLReflowCommand*, mTimeoutReflowCommands.ElementAt(i)); ReflowCommandRemoved(rc); delete rc; } NS_ASSERTION(n == mTimeoutReflowCommands.Count(),"timeout reflow command list changed during cancel!"); mTimeoutReflowCommands.Clear();
PresShell::CancelAllReflowCommands(){  PRInt32 n = mReflowCommands.Count();  nsHTMLReflowCommand* rc;  PRInt32 i;  for (i = 0; i < n; i++) {    rc = NS_STATIC_CAST(nsHTMLReflowCommand*, mReflowCommands.ElementAt(i));    ReflowCommandRemoved(rc);    delete rc;  }  NS_ASSERTION(n == mReflowCommands.Count(),"reflow command list changed during cancel!");  mReflowCommands.Clear();  n = mTimeoutReflowCommands.Count();  for (i = 0; i < n; i++) {    rc = NS_STATIC_CAST(nsHTMLReflowCommand*, mTimeoutReflowCommands.ElementAt(i));    ReflowCommandRemoved(rc);    delete rc;  }  NS_ASSERTION(n == mTimeoutReflowCommands.Count(),"timeout reflow command list changed during cancel!");  mTimeoutReflowCommands.Clear();  DoneRemovingReflowCommands();  return NS_OK;}