Fix by Mitz Pettel, reviewed by Darin.
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Feb 2006 17:09:51 +0000 (17:09 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Feb 2006 17:09:51 +0000 (17:09 +0000)
        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7274
          Assertion failure in TimerBase::checkHeapIndex() (Timer.cpp:199) !timerHeap->isEmpty()

        * platform/Timer.cpp:
        (WebCore::TimerBase::stop): Call setNextFireTime(0) unconditionally to make sure the timer
        is removed from timersReadyToFire so that fireTimers doesn't try to fire a deleted timer.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@12847 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/Timer.cpp

index eea4a14446dbbb7e1aa7a7b58cb7a93eacf95137..15c77946819f3d2541730262658856e20cf79d53 100644 (file)
@@ -1,3 +1,14 @@
+2006-02-16  Mitz Pettel  <opendarwin.org@mitzpettel.com>
+
+        Reviewed by Darin, landed by ap.
+
+        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7274
+          Assertion failure in TimerBase::checkHeapIndex() (Timer.cpp:199) !timerHeap->isEmpty()
+
+        * platform/Timer.cpp:
+        (WebCore::TimerBase::stop): Call setNextFireTime(0) unconditionally to make sure the timer
+        is removed from timersReadyToFire so that fireTimers doesn't try to fire a deleted timer.
+
 2006-02-15  Geoffrey Garen  <ggaren@apple.com>
 
         Reviewed by Maciej, Eric.
index d33db3b8ab2ab05b86202368eeb1044677446fa3..91e66e7e10eba0078a8293576e4ea6f86c3dfcc4 100644 (file)
@@ -176,8 +176,7 @@ void TimerBase::start(double nextFireInterval, double repeatInterval)
 void TimerBase::stop()
 {
     m_repeatInterval = 0;
-    if (m_nextFireTime)
-        setNextFireTime(0);
+    setNextFireTime(0);
 
     ASSERT(m_nextFireTime == 0);
     ASSERT(m_repeatInterval == 0);