Random crashes on the Web Thread due to Timers firing on the wrong thread in the...
[WebKit-https.git] / Source / WebKit2 / UIProcess / ProcessThrottler.h
index c7129ccde0fb8b57af685412b6bdbaed8300134a..f30c1b6eafe113d8064796af1fddbce176e5e4c8 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "ProcessAssertion.h"
 
 
 #include "ProcessAssertion.h"
 
-#include <WebCore/Timer.h>
+#include <wtf/RunLoop.h>
 #include <wtf/WeakPtr.h>
 
 namespace WebKit {
 #include <wtf/WeakPtr.h>
 
 namespace WebKit {
@@ -69,12 +69,12 @@ private:
     AssertionState assertionState();
     void updateAssertion();
     void updateAssertionNow();
     AssertionState assertionState();
     void updateAssertion();
     void updateAssertionNow();
-    void suspendTimerFired(WebCore::Timer<ProcessThrottler>*);
+    void suspendTimerFired();
     
     WebProcessProxy* m_process;
     WeakPtrFactory<ProcessThrottler> m_weakPtrFactory;
     std::unique_ptr<ProcessAndUIAssertion> m_assertion;
     
     WebProcessProxy* m_process;
     WeakPtrFactory<ProcessThrottler> m_weakPtrFactory;
     std::unique_ptr<ProcessAndUIAssertion> m_assertion;
-    WebCore::Timer<ProcessThrottler> m_suspendTimer;
+    RunLoop::Timer<ProcessThrottler> m_suspendTimer;
     unsigned m_foregroundCount;
     unsigned m_backgroundCount;
     int m_suspendMessageCount;
     unsigned m_foregroundCount;
     unsigned m_backgroundCount;
     int m_suspendMessageCount;