Changeset 151268 in webkit


Ignore:
Timestamp:
Jun 6, 2013 6:52:45 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Cannot set a new timer inside of timer callback in RunLoopTimerGtk & RunLoopTimerEFL
https://bugs.webkit.org/show_bug.cgi?id=117224

Patch by Gwang Yoon Hwang <ryumiel@company100.net> on 2013-06-06
Reviewed by Christophe Dumez.

RunLoopTimer should clear its isActive flag before invoking timer
callback.

  • platform/efl/RunLoopEfl.cpp:

(WebCore::RunLoop::TimerBase::timerFired):

  • platform/gtk/RunLoopGtk.cpp:

(WebCore::RunLoop::TimerBase::timerFiredCallback):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r151267 r151268  
     12013-06-06  Gwang Yoon Hwang  <ryumiel@company100.net>
     2
     3        Cannot set a new timer inside of timer callback in RunLoopTimerGtk & RunLoopTimerEFL
     4        https://bugs.webkit.org/show_bug.cgi?id=117224
     5
     6        Reviewed by Christophe Dumez.
     7
     8        RunLoopTimer should clear its isActive flag before invoking timer
     9        callback.
     10
     11        * platform/efl/RunLoopEfl.cpp:
     12        (WebCore::RunLoop::TimerBase::timerFired):
     13        * platform/gtk/RunLoopGtk.cpp:
     14        (WebCore::RunLoop::TimerBase::timerFiredCallback):
     15
    1162013-06-06  Diego Pino Garcia  <dpino@igalia.com>
    217
  • trunk/Source/WebCore/platform/efl/RunLoopEfl.cpp

    r149358 r151268  
    101101    RunLoop::TimerBase* timer = static_cast<RunLoop::TimerBase*>(data);
    102102
     103    if (!timer->m_isRepeating)
     104        timer->m_timer = 0;
     105
    103106    timer->fired();
    104107
    105     if (!timer->m_isRepeating) {
    106         timer->m_timer = 0;
    107         return ECORE_CALLBACK_CANCEL;
    108     }
    109 
    110     return ECORE_CALLBACK_RENEW;
     108    return timer->m_isRepeating ? ECORE_CALLBACK_RENEW : ECORE_CALLBACK_CANCEL;
    111109}
    112110
  • trunk/Source/WebCore/platform/gtk/RunLoopGtk.cpp

    r149358 r151268  
    137137    bool isRepeating = timer->isRepeating();
    138138    // This can change the timerSource by starting a new timer within the callback.
    139     timer->fired();
    140139    if (!isRepeating && currentTimerSource == timer->m_timerSource.get())
    141140        timer->clearTimerSource();
     141
     142    timer->fired();
    142143    return isRepeating;
    143144}
Note: See TracChangeset for help on using the changeset viewer.