Unreviewed, rolling out r235784.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Sep 2018 18:15:48 +0000 (18:15 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Sep 2018 18:15:48 +0000 (18:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=189421

RunLoopCF does not agree to the fix (Requested by yusukesuzuki
on #webkit).

Reverted changeset:

"[RunLoopGeneric] OneShotTimer should be inactive when fired."
https://bugs.webkit.org/show_bug.cgi?id=189335
https://trac.webkit.org/changeset/235784

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

Source/WTF/ChangeLog
Source/WTF/wtf/generic/RunLoopGeneric.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp

index 7256148..1b80c24 100644 (file)
@@ -1,3 +1,17 @@
+2018-09-07  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r235784.
+        https://bugs.webkit.org/show_bug.cgi?id=189421
+
+        RunLoopCF does not agree to the fix (Requested by yusukesuzuki
+        on #webkit).
+
+        Reverted changeset:
+
+        "[RunLoopGeneric] OneShotTimer should be inactive when fired."
+        https://bugs.webkit.org/show_bug.cgi?id=189335
+        https://trac.webkit.org/changeset/235784
+
 2018-09-07  Yoshiaki Jitsukawa  <yoshiaki.jitsukawa@sony.com>
 
         [RunLoopGeneric] OneShotTimer should be inactive when fired.
index b45b1b9..7869199 100644 (file)
@@ -50,13 +50,12 @@ public:
         if (!isActive())
             return false;
 
-        if (!m_isRepeating)
-            deactivate();
-
         m_function();
 
-        if (isActive())
-            updateReadyTime();
+        if (!m_isRepeating)
+            return false;
+
+        updateReadyTime();
         return isActive();
     }
 
@@ -291,7 +290,7 @@ bool RunLoop::TimerBase::isActive() const
 
 bool RunLoop::TimerBase::isActive(const AbstractLocker&) const
 {
-    return m_scheduledTask && m_scheduledTask->isActive();
+    return m_scheduledTask;
 }
 
 Seconds RunLoop::TimerBase::secondsUntilFire() const
index 187ba92..400c797 100644 (file)
@@ -1,3 +1,17 @@
+2018-09-07  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r235784.
+        https://bugs.webkit.org/show_bug.cgi?id=189421
+
+        RunLoopCF does not agree to the fix (Requested by yusukesuzuki
+        on #webkit).
+
+        Reverted changeset:
+
+        "[RunLoopGeneric] OneShotTimer should be inactive when fired."
+        https://bugs.webkit.org/show_bug.cgi?id=189335
+        https://trac.webkit.org/changeset/235784
+
 2018-09-07  Yoshiaki Jitsukawa  <yoshiaki.jitsukawa@sony.com>
 
         [RunLoopGeneric] OneShotTimer should be inactive when fired.
index 33c69ff..93b3d8c 100644 (file)
@@ -85,7 +85,6 @@ TEST(WTF_RunLoop, OneShotTimer)
 
         void fired()
         {
-            EXPECT_FALSE(isActive());
             m_testFinished = true;
             stop();
         }
@@ -101,44 +100,6 @@ TEST(WTF_RunLoop, OneShotTimer)
     }
 }
 
-TEST(WTF_RunLoop, ChainingOneShotTimer)
-{
-    RunLoop::initializeMainRunLoop();
-
-    bool testFinished = false;
-
-    class DerivedTimer : public RunLoop::Timer<DerivedTimer> {
-    public:
-        DerivedTimer(bool& testFinished)
-            : RunLoop::Timer<DerivedTimer>(RunLoop::current(), this, &DerivedTimer::fired)
-            , m_testFinished(testFinished)
-        {
-        }
-
-        void fired()
-        {
-            EXPECT_FALSE(isActive());
-            if (++m_count != 2) {
-                startOneShot(100_ms);
-                EXPECT_TRUE(isActive());
-            } else {
-                m_testFinished = true;
-                stop();
-            }
-        }
-
-    private:
-        unsigned m_count { 0 };
-        bool& m_testFinished;
-    };
-
-    {
-        DerivedTimer timer(testFinished);
-        timer.startOneShot(100_ms);
-        Util::run(&testFinished);
-    }
-}
-
 TEST(WTF_RunLoop, RepeatingTimer)
 {
     RunLoop::initializeMainRunLoop();
@@ -155,7 +116,6 @@ TEST(WTF_RunLoop, RepeatingTimer)
 
         void fired()
         {
-            EXPECT_TRUE(isActive());
             if (++m_count == 10) {
                 m_testFinished = true;
                 stop();