Changeset 176591 in webkit


Ignore:
Timestamp:
Dec 1, 2014, 6:48:34 AM (10 years ago)
Author:
commit-queue@webkit.org
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

Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r176574 r176591  
     12014-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
    1152014-11-29  Anders Carlsson  <andersca@apple.com>
    216
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

    r176566 r176591  
    3939typedef RetainPtr<CFRunLoopTimerRef> PlatformTimerRef;
    4040#elif PLATFORM(GTK)
    41 #include <wtf/gobject/GMainLoopSource.h>
    42 typedef GMainLoopSource PlatformTimerRef;
     41typedef unsigned int PlatformTimerRef;
    4342#elif PLATFORM(EFL)
    4443typedef Ecore_Timer* PlatformTimerRef;
  • trunk/Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp

    r176566 r176591  
    3535namespace WTR {
    3636
     37static gboolean waitToDumpWatchdogTimerCallback(gpointer)
     38{
     39    InjectedBundle::shared().testRunner()->waitToDumpWatchdogTimerFired();
     40    return FALSE;
     41}
     42
    3743void TestRunner::platformInitialize()
    3844{
     45    m_waitToDumpWatchdogTimer = 0;
    3946}
    4047
    4148void TestRunner::invalidateWaitToDumpWatchdogTimer()
    4249{
    43     m_waitToDumpWatchdogTimer.cancel();
     50    if (!m_waitToDumpWatchdogTimer)
     51        return;
     52    g_source_remove(m_waitToDumpWatchdogTimer);
     53    m_waitToDumpWatchdogTimer = 0;
    4454}
    4555
    4656void TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded()
    4757{
    48     if (m_waitToDumpWatchdogTimer.isScheduled())
     58    if (m_waitToDumpWatchdogTimer)
    4959        return;
    5060
    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");
    5364}
    5465
  • trunk/Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp

    r176566 r176591  
    3030#include <gtk/gtk.h>
    3131#include <wtf/Platform.h>
    32 #include <wtf/gobject/GMainLoopSource.h>
    3332#include <wtf/gobject/GUniquePtr.h>
    3433#include <wtf/text/WTFString.h>
     
    3635namespace WTR {
    3736
    38 static GMainLoopSource timeoutSource;
     37static guint gTimeoutSourceId = 0;
     38
     39static void cancelTimeout()
     40{
     41    if (!gTimeoutSourceId)
     42        return;
     43    g_source_remove(gTimeoutSourceId);
     44    gTimeoutSourceId = 0;
     45}
    3946
    4047void TestController::notifyDone()
    4148{
    4249    gtk_main_quit();
    43     timeoutSource.cancel();
     50    cancelTimeout();
    4451}
    4552
     
    5259}
    5360
     61static gboolean timeoutCallback(gpointer)
     62{
     63    fprintf(stderr, "FAIL: TestControllerRunLoop timed out.\n");
     64    gtk_main_quit();
     65    return FALSE;
     66}
     67
    5468void TestController::platformWillRunTest(const TestInvocation&)
    5569{
     
    5872void TestController::platformRunUntil(bool&, double timeout)
    5973{
    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    }
    6479    gtk_main();
    6580}
Note: See TracChangeset for help on using the changeset viewer.