A hung webpage pretends to be responsive if you scroll
[WebKit-https.git] / Source / WebKit2 / UIProcess / WebProcessProxy.cpp
index 0b8c29ed25254644cec051c089efc98e71e5033c..cd1de9d758e65cb263b016f6a99409c2b3942fb9 100644 (file)
@@ -1002,4 +1002,15 @@ void WebProcessProxy::setIsHoldingLockedFiles(bool isHoldingLockedFiles)
         m_tokenForHoldingLockedFiles = m_throttler.backgroundActivityToken();
 }
 
+void WebProcessProxy::sendMainThreadPing()
+{
+    responsivenessTimer().start();
+    send(Messages::WebProcess::MainThreadPing(), 0);
+}
+
+void WebProcessProxy::didReceiveMainThreadPing()
+{
+    responsivenessTimer().stop();
+}
+
 } // namespace WebKit