Title: [176591] trunk/Tools
- Revision
- 176591
- Author
- [email protected]
- Date
- 2014-12-01 06:48:34 -0800 (Mon, 01 Dec 2014)
Log Message
Unreviewed, rolling out r176566.
https://bugs.webkit.org/show_bug.cgi?id=139124
It broke the GTK performance tests. (Requested by clopez on
#webkit).
Reverted changeset:
"[GTK] Use GMainLoopSource in WebKitTestRunner"
https://bugs.webkit.org/show_bug.cgi?id=138831
http://trac.webkit.org/changeset/176566
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (176590 => 176591)
--- trunk/Tools/ChangeLog 2014-12-01 07:36:45 UTC (rev 176590)
+++ trunk/Tools/ChangeLog 2014-12-01 14:48:34 UTC (rev 176591)
@@ -1,3 +1,17 @@
+2014-12-01 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r176566.
+ https://bugs.webkit.org/show_bug.cgi?id=139124
+
+ It broke the GTK performance tests. (Requested by clopez on
+ #webkit).
+
+ Reverted changeset:
+
+ "[GTK] Use GMainLoopSource in WebKitTestRunner"
+ https://bugs.webkit.org/show_bug.cgi?id=138831
+ http://trac.webkit.org/changeset/176566
+
2014-11-29 Anders Carlsson <[email protected]>
Crash when calling WKPageClose on the originated page from within createNewPage callback
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (176590 => 176591)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2014-12-01 07:36:45 UTC (rev 176590)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2014-12-01 14:48:34 UTC (rev 176591)
@@ -38,8 +38,7 @@
#include <CoreFoundation/CFRunLoop.h>
typedef RetainPtr<CFRunLoopTimerRef> PlatformTimerRef;
#elif PLATFORM(GTK)
-#include <wtf/gobject/GMainLoopSource.h>
-typedef GMainLoopSource PlatformTimerRef;
+typedef unsigned int PlatformTimerRef;
#elif PLATFORM(EFL)
typedef Ecore_Timer* PlatformTimerRef;
#endif
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp (176590 => 176591)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp 2014-12-01 07:36:45 UTC (rev 176590)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp 2014-12-01 14:48:34 UTC (rev 176591)
@@ -34,22 +34,33 @@
namespace WTR {
+static gboolean waitToDumpWatchdogTimerCallback(gpointer)
+{
+ InjectedBundle::shared().testRunner()->waitToDumpWatchdogTimerFired();
+ return FALSE;
+}
+
void TestRunner::platformInitialize()
{
+ m_waitToDumpWatchdogTimer = 0;
}
void TestRunner::invalidateWaitToDumpWatchdogTimer()
{
- m_waitToDumpWatchdogTimer.cancel();
+ if (!m_waitToDumpWatchdogTimer)
+ return;
+ g_source_remove(m_waitToDumpWatchdogTimer);
+ m_waitToDumpWatchdogTimer = 0;
}
void TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded()
{
- if (m_waitToDumpWatchdogTimer.isScheduled())
+ if (m_waitToDumpWatchdogTimer)
return;
- m_waitToDumpWatchdogTimer.scheduleAfterDelay("[WTR] waitToDumpWatchdogTimerCallback", [this] { waitToDumpWatchdogTimerFired(); },
- std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::duration<double>(waitToDumpWatchdogTimerInterval)));
+ m_waitToDumpWatchdogTimer = g_timeout_add(waitToDumpWatchdogTimerInterval * 1000,
+ waitToDumpWatchdogTimerCallback, 0);
+ g_source_set_name_by_id(m_waitToDumpWatchdogTimer, "[WebKit] waitToDumpWatchdogTimerCallback");
}
JSRetainPtr<JSStringRef> TestRunner::pathToLocalResource(JSStringRef url)
Modified: trunk/Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp (176590 => 176591)
--- trunk/Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp 2014-12-01 07:36:45 UTC (rev 176590)
+++ trunk/Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp 2014-12-01 14:48:34 UTC (rev 176591)
@@ -29,18 +29,25 @@
#include <gtk/gtk.h>
#include <wtf/Platform.h>
-#include <wtf/gobject/GMainLoopSource.h>
#include <wtf/gobject/GUniquePtr.h>
#include <wtf/text/WTFString.h>
namespace WTR {
-static GMainLoopSource timeoutSource;
+static guint gTimeoutSourceId = 0;
+static void cancelTimeout()
+{
+ if (!gTimeoutSourceId)
+ return;
+ g_source_remove(gTimeoutSourceId);
+ gTimeoutSourceId = 0;
+}
+
void TestController::notifyDone()
{
gtk_main_quit();
- timeoutSource.cancel();
+ cancelTimeout();
}
void TestController::platformInitialize()
@@ -51,16 +58,24 @@
{
}
+static gboolean timeoutCallback(gpointer)
+{
+ fprintf(stderr, "FAIL: TestControllerRunLoop timed out.\n");
+ gtk_main_quit();
+ return FALSE;
+}
+
void TestController::platformWillRunTest(const TestInvocation&)
{
}
void TestController::platformRunUntil(bool&, double timeout)
{
- timeoutSource.scheduleAfterDelay("[WTR] Test timeout source", [] {
- fprintf(stderr, "FAIL: TestControllerRunLoop timed out.\n");
- gtk_main_quit();
- }, std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::duration<double>(timeout)));
+ cancelTimeout();
+ if (timeout != m_noTimeout) {
+ gTimeoutSourceId = g_timeout_add(timeout * 1000, timeoutCallback, 0);
+ g_source_set_name_by_id(gTimeoutSourceId, "[WebKit] timeoutCallback");
+ }
gtk_main();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes