Changeset 176591 in webkit
- Timestamp:
- Dec 1, 2014, 6:48:34 AM (10 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r176574 r176591 1 2014-12-01 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r176566. 4 https://bugs.webkit.org/show_bug.cgi?id=139124 5 6 It broke the GTK performance tests. (Requested by clopez on 7 #webkit). 8 9 Reverted changeset: 10 11 "[GTK] Use GMainLoopSource in WebKitTestRunner" 12 https://bugs.webkit.org/show_bug.cgi?id=138831 13 http://trac.webkit.org/changeset/176566 14 1 15 2014-11-29 Anders Carlsson <andersca@apple.com> 2 16 -
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
r176566 r176591 39 39 typedef RetainPtr<CFRunLoopTimerRef> PlatformTimerRef; 40 40 #elif PLATFORM(GTK) 41 #include <wtf/gobject/GMainLoopSource.h> 42 typedef GMainLoopSource PlatformTimerRef; 41 typedef unsigned int PlatformTimerRef; 43 42 #elif PLATFORM(EFL) 44 43 typedef Ecore_Timer* PlatformTimerRef; -
trunk/Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp
r176566 r176591 35 35 namespace WTR { 36 36 37 static gboolean waitToDumpWatchdogTimerCallback(gpointer) 38 { 39 InjectedBundle::shared().testRunner()->waitToDumpWatchdogTimerFired(); 40 return FALSE; 41 } 42 37 43 void TestRunner::platformInitialize() 38 44 { 45 m_waitToDumpWatchdogTimer = 0; 39 46 } 40 47 41 48 void TestRunner::invalidateWaitToDumpWatchdogTimer() 42 49 { 43 m_waitToDumpWatchdogTimer.cancel(); 50 if (!m_waitToDumpWatchdogTimer) 51 return; 52 g_source_remove(m_waitToDumpWatchdogTimer); 53 m_waitToDumpWatchdogTimer = 0; 44 54 } 45 55 46 56 void TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded() 47 57 { 48 if (m_waitToDumpWatchdogTimer .isScheduled())58 if (m_waitToDumpWatchdogTimer) 49 59 return; 50 60 51 m_waitToDumpWatchdogTimer.scheduleAfterDelay("[WTR] waitToDumpWatchdogTimerCallback", [this] { waitToDumpWatchdogTimerFired(); }, 52 std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::duration<double>(waitToDumpWatchdogTimerInterval))); 61 m_waitToDumpWatchdogTimer = g_timeout_add(waitToDumpWatchdogTimerInterval * 1000, 62 waitToDumpWatchdogTimerCallback, 0); 63 g_source_set_name_by_id(m_waitToDumpWatchdogTimer, "[WebKit] waitToDumpWatchdogTimerCallback"); 53 64 } 54 65 -
trunk/Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp
r176566 r176591 30 30 #include <gtk/gtk.h> 31 31 #include <wtf/Platform.h> 32 #include <wtf/gobject/GMainLoopSource.h>33 32 #include <wtf/gobject/GUniquePtr.h> 34 33 #include <wtf/text/WTFString.h> … … 36 35 namespace WTR { 37 36 38 static GMainLoopSource timeoutSource; 37 static guint gTimeoutSourceId = 0; 38 39 static void cancelTimeout() 40 { 41 if (!gTimeoutSourceId) 42 return; 43 g_source_remove(gTimeoutSourceId); 44 gTimeoutSourceId = 0; 45 } 39 46 40 47 void TestController::notifyDone() 41 48 { 42 49 gtk_main_quit(); 43 timeoutSource.cancel();50 cancelTimeout(); 44 51 } 45 52 … … 52 59 } 53 60 61 static gboolean timeoutCallback(gpointer) 62 { 63 fprintf(stderr, "FAIL: TestControllerRunLoop timed out.\n"); 64 gtk_main_quit(); 65 return FALSE; 66 } 67 54 68 void TestController::platformWillRunTest(const TestInvocation&) 55 69 { … … 58 72 void TestController::platformRunUntil(bool&, double timeout) 59 73 { 60 timeoutSource.scheduleAfterDelay("[WTR] Test timeout source", [] { 61 fprintf(stderr, "FAIL: TestControllerRunLoop timed out.\n"); 62 gtk_main_quit(); 63 }, std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::duration<double>(timeout))); 74 cancelTimeout(); 75 if (timeout != m_noTimeout) { 76 gTimeoutSourceId = g_timeout_add(timeout * 1000, timeoutCallback, 0); 77 g_source_set_name_by_id(gTimeoutSourceId, "[WebKit] timeoutCallback"); 78 } 64 79 gtk_main(); 65 80 }
Note:
See TracChangeset
for help on using the changeset viewer.