diff options
Diffstat (limited to 'WebCore/page/DOMTimer.cpp')
-rw-r--r-- | WebCore/page/DOMTimer.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/WebCore/page/DOMTimer.cpp b/WebCore/page/DOMTimer.cpp index c42a0dc..dd1e842 100644 --- a/WebCore/page/DOMTimer.cpp +++ b/WebCore/page/DOMTimer.cpp @@ -47,6 +47,9 @@ DOMTimer::DOMTimer(ScriptExecutionContext* context, ScheduledAction* action, int , m_action(action) , m_nextFireInterval(0) , m_repeatInterval(0) +#if !ASSERT_DISABLED + , m_suspended(false) +#endif { static int lastUsedTimeoutId = 0; ++lastUsedTimeoutId; @@ -148,7 +151,10 @@ void DOMTimer::stop() void DOMTimer::suspend() { - ASSERT(!m_nextFireInterval && !m_repeatInterval); +#if !ASSERT_DISABLED + ASSERT(!m_suspended); + m_suspended = true; +#endif m_nextFireInterval = nextFireInterval(); m_repeatInterval = repeatInterval(); TimerBase::stop(); @@ -156,9 +162,11 @@ void DOMTimer::suspend() void DOMTimer::resume() { +#if !ASSERT_DISABLED + ASSERT(m_suspended); + m_suspended = false; +#endif start(m_nextFireInterval, m_repeatInterval); - m_nextFireInterval = 0; - m_repeatInterval = 0; } |