HysteresisActivity cannot be used in the UIProcess
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jul 2017 23:32:58 +0000 (23:32 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jul 2017 23:32:58 +0000 (23:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=174643
<rdar://problem/33086442>

Reviewed by Tim Horton.

Port HysteresisActivity to RunLoop::Timer so that it can safely be used in
the UIProcess as well.

* platform/HysteresisActivity.h:

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

Source/WebCore/ChangeLog
Source/WebCore/platform/HysteresisActivity.h

index c18398b..09c0e22 100644 (file)
@@ -1,3 +1,16 @@
+2017-07-18  Chris Dumez  <cdumez@apple.com>
+
+        HysteresisActivity cannot be used in the UIProcess
+        https://bugs.webkit.org/show_bug.cgi?id=174643
+        <rdar://problem/33086442>
+
+        Reviewed by Tim Horton.
+
+        Port HysteresisActivity to RunLoop::Timer so that it can safely be used in
+        the UIProcess as well.
+
+        * platform/HysteresisActivity.h:
+
 2017-07-18  Joseph Pecoraro  <pecoraro@apple.com>
 
         Web Inspector: Modernize InjectedScriptSource
index 9182053..a5c82fd 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef HysteresisActivity_h
 #define HysteresisActivity_h
 
-#include "Timer.h"
+#include <wtf/RunLoop.h>
 #include <wtf/Seconds.h>
 
 namespace WebCore {
@@ -44,7 +44,7 @@ public:
         : m_callback(WTFMove(callback))
         , m_hysteresisSeconds(hysteresisSeconds)
         , m_active(false)
-        , m_timer(*this, &HysteresisActivity::hysteresisTimerFired)
+        , m_timer(RunLoop::main(), this, &HysteresisActivity::hysteresisTimerFired)
     {
     }
 
@@ -92,7 +92,7 @@ private:
     WTF::Function<void(HysteresisState)> m_callback;
     Seconds m_hysteresisSeconds;
     bool m_active;
-    Timer m_timer;
+    RunLoop::Timer<HysteresisActivity> m_timer;
 };
 
 } // namespace WebCore