Random crashes on the Web Thread due to Timers firing on the wrong thread in the...
[WebKit-https.git] / Source / WebKit2 / UIProcess / ios / ViewGestureControllerIOS.mm
index 58be849e9c87d4e23e81adb8e075597850884d87..8fe9a6e15450c4a886e389c6f035cb1c2830396e 100644 (file)
@@ -136,7 +136,7 @@ namespace WebKit {
 ViewGestureController::ViewGestureController(WebPageProxy& webPageProxy)
     : m_webPageProxy(webPageProxy)
     , m_activeGestureType(ViewGestureType::None)
 ViewGestureController::ViewGestureController(WebPageProxy& webPageProxy)
     : m_webPageProxy(webPageProxy)
     , m_activeGestureType(ViewGestureType::None)
-    , m_swipeWatchdogTimer(this, &ViewGestureController::swipeSnapshotWatchdogTimerFired)
+    , m_swipeWatchdogTimer(RunLoop::main(), this, &ViewGestureController::swipeSnapshotWatchdogTimerFired)
     , m_snapshotRemovalTargetRenderTreeSize(0)
     , m_shouldRemoveSnapshotWhenTargetRenderTreeSizeHit(false)
 {
     , m_snapshotRemovalTargetRenderTreeSize(0)
     , m_shouldRemoveSnapshotWhenTargetRenderTreeSizeHit(false)
 {
@@ -310,7 +310,7 @@ void ViewGestureController::setRenderTreeSize(uint64_t renderTreeSize)
         removeSwipeSnapshot();
 }
 
         removeSwipeSnapshot();
 }
 
-void ViewGestureController::swipeSnapshotWatchdogTimerFired(Timer<ViewGestureController>*)
+void ViewGestureController::swipeSnapshotWatchdogTimerFired()
 {
     removeSwipeSnapshot();
 }
 {
     removeSwipeSnapshot();
 }