webengine/osswebengine/WebCore/platform/Timer.cpp
changeset 11 c8a366e56285
parent 5 10e98eab6f85
child 40 8bfb9186a8b8
equal deleted inserted replaced
10:a359256acfc6 11:c8a366e56285
   226 
   226 
   227 void TimerBase::heapDecreaseKey()
   227 void TimerBase::heapDecreaseKey()
   228 {
   228 {
   229     ASSERT(m_nextFireTime != 0);
   229     ASSERT(m_nextFireTime != 0);
   230     checkHeapIndex();
   230     checkHeapIndex();
   231     push_heap(TimerHeapIterator(0), TimerHeapIterator(m_heapIndex + 1));
   231     #if PLATFORM(SYMBIAN)
       
   232     // check for valid heap index
       
   233     if(m_heapIndex < static_cast<int>(timerHeap->size()))
       
   234     #endif
       
   235         {
       
   236         push_heap(TimerHeapIterator(0), TimerHeapIterator(m_heapIndex + 1));
       
   237         }
   232     checkHeapIndex();
   238     checkHeapIndex();
   233 }
   239 }
   234 
   240 
   235 inline void TimerBase::heapDelete()
   241 inline void TimerBase::heapDelete()
   236 {
   242 {
   375 {
   381 {
   376     timersReadyToFire = 0;
   382     timersReadyToFire = 0;
   377     updateSharedTimer();
   383     updateSharedTimer();
   378 }
   384 }
   379 
   385 
       
   386 #if PLATFORM(SYMBIAN)
       
   387 void TimerBase::deleteTimerHeap()
       
   388 {
       
   389     if (timerHeap)
       
   390     {
       
   391         while (!timerHeap->isEmpty())
       
   392         {
       
   393             TimerBase* timer = timerHeap->first();
       
   394             timer->m_nextFireTime = 0;
       
   395             timer->heapDeleteMin();        
       
   396         }
       
   397         delete timerHeap ;
       
   398         timerHeap = NULL ;
       
   399     }
       
   400 }
       
   401 #endif
       
   402 
   380 // ----------------
   403 // ----------------
   381 
   404 
   382 bool isDeferringTimers()
   405 bool isDeferringTimers()
   383 {
   406 {
   384     return deferringTimers;
   407     return deferringTimers;