if (NS_STATIC_CAST(nsTimerImpl*, event->e.owner)->GetPriority() < NS_PRIORITY_HIGHEST) {
if (NS_STATIC_CAST(nsTimerImpl*, event->e.owner)->IsIdle()) {
void* handleTimerEvent(TimerEventType* event){#ifdef DEBUG_TIMERS  if (PR_LOG_TEST(gTimerLog, PR_LOG_DEBUG)) {    PRIntervalTime now = PR_IntervalNow();    PR_LOG(gTimerLog, PR_LOG_DEBUG,           ("[this=%p] time between PostTimerEvent() and Fire(): %dms\n",            event->e.owner, PR_IntervalToMilliseconds(now - event->mInit)));  }#endif  if (gFireOnIdle) {    if (NS_STATIC_CAST(nsTimerImpl*, event->e.owner)->GetPriority() < NS_PRIORITY_HIGHEST) {      nsCOMPtr<nsIThread> currentThread, mainThread;      nsIThread::GetCurrent(getter_AddRefs(currentThread));      nsIThread::GetMainThread(getter_AddRefs(mainThread));      if (currentThread == mainThread) {        gIdleTimers->AppendElement(NS_STATIC_CAST(nsITimer*, NS_STATIC_CAST(nsTimerImpl*, event->e.owner)));        return NULL;      }    }  }  NS_STATIC_CAST(nsTimerImpl*, event->e.owner)->Fire();  return NULL;}