Title: [91383] trunk/Source
Revision
91383
Author
[email protected]
Date
2011-07-20 11:43:43 -0700 (Wed, 20 Jul 2011)

Log Message

Revert worker and WebKit2 runloops to use currentTime() for scheduling instead of the monotonic clock
https://bugs.webkit.org/show_bug.cgi?id=64841

Patch by James Robinson <[email protected]> on 2011-07-20
Reviewed by Mark Rowe.

http://trac.webkit.org/changeset/91206 converted most of WebKit's deferred work scheduling to using the
monotonic clock instead of WTF::currentTime().  This broke many plugin tests on WebKit2 for reasons that are
unclear.  This reverts everything except for WebCore::ThreadTimers back to the previous behavior.

Source/_javascript_Core:

* wtf/ThreadingPthreads.cpp:
(WTF::ThreadCondition::timedWait):
* wtf/ThreadingWin.cpp:
(WTF::absoluteTimeToWaitTimeoutInterval):
* wtf/gtk/ThreadingGtk.cpp:
(WTF::ThreadCondition::timedWait):
* wtf/qt/ThreadingQt.cpp:
(WTF::ThreadCondition::timedWait):

Source/WebCore:

* workers/WorkerRunLoop.cpp:
(WebCore::WorkerSharedTimer::setFireInterval):

Source/WebKit2:

* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::waitForMessage):
(CoreIPC::Connection::waitForSyncReply):
* Platform/RunLoop.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (91382 => 91383)


--- trunk/Source/_javascript_Core/ChangeLog	2011-07-20 18:32:54 UTC (rev 91382)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-07-20 18:43:43 UTC (rev 91383)
@@ -1,3 +1,23 @@
+2011-07-20  James Robinson  <[email protected]>
+
+        Revert worker and WebKit2 runloops to use currentTime() for scheduling instead of the monotonic clock
+        https://bugs.webkit.org/show_bug.cgi?id=64841
+
+        Reviewed by Mark Rowe.
+
+        http://trac.webkit.org/changeset/91206 converted most of WebKit's deferred work scheduling to using the
+        monotonic clock instead of WTF::currentTime().  This broke many plugin tests on WebKit2 for reasons that are
+        unclear.  This reverts everything except for WebCore::ThreadTimers back to the previous behavior.
+
+        * wtf/ThreadingPthreads.cpp:
+        (WTF::ThreadCondition::timedWait):
+        * wtf/ThreadingWin.cpp:
+        (WTF::absoluteTimeToWaitTimeoutInterval):
+        * wtf/gtk/ThreadingGtk.cpp:
+        (WTF::ThreadCondition::timedWait):
+        * wtf/qt/ThreadingQt.cpp:
+        (WTF::ThreadCondition::timedWait):
+
 2011-07-14  David Levin  <[email protected]>
 
         currentThread is too slow!

Modified: trunk/Source/_javascript_Core/wtf/ThreadingPthreads.cpp (91382 => 91383)


--- trunk/Source/_javascript_Core/wtf/ThreadingPthreads.cpp	2011-07-20 18:32:54 UTC (rev 91382)
+++ trunk/Source/_javascript_Core/wtf/ThreadingPthreads.cpp	2011-07-20 18:43:43 UTC (rev 91383)
@@ -364,7 +364,7 @@
 
 bool ThreadCondition::timedWait(Mutex& mutex, double absoluteTime)
 {
-    if (absoluteTime < monotonicallyIncreasingTime())
+    if (absoluteTime < currentTime())
         return false;
 
     if (absoluteTime > INT_MAX) {

Modified: trunk/Source/_javascript_Core/wtf/ThreadingWin.cpp (91382 => 91383)


--- trunk/Source/_javascript_Core/wtf/ThreadingWin.cpp	2011-07-20 18:32:54 UTC (rev 91382)
+++ trunk/Source/_javascript_Core/wtf/ThreadingWin.cpp	2011-07-20 18:43:43 UTC (rev 91383)
@@ -483,7 +483,7 @@
 
 DWORD absoluteTimeToWaitTimeoutInterval(double absoluteTime)
 {
-    double currentTime = monotonicallyIncreasingTime();
+    double currentTime = WTF::currentTime();
 
     // Time is in the past - return immediately.
     if (absoluteTime < currentTime)

Modified: trunk/Source/_javascript_Core/wtf/gtk/ThreadingGtk.cpp (91382 => 91383)


--- trunk/Source/_javascript_Core/wtf/gtk/ThreadingGtk.cpp	2011-07-20 18:32:54 UTC (rev 91382)
+++ trunk/Source/_javascript_Core/wtf/gtk/ThreadingGtk.cpp	2011-07-20 18:43:43 UTC (rev 91383)
@@ -213,7 +213,7 @@
 bool ThreadCondition::timedWait(Mutex& mutex, double absoluteTime)
 {
     // Time is in the past - return right away.
-    if (absoluteTime < monotonicallyIncreasingTime())
+    if (absoluteTime < currentTime())
         return false;
     
     // Time is too far in the future for g_cond_timed_wait - wait forever.

Modified: trunk/Source/_javascript_Core/wtf/qt/ThreadingQt.cpp (91382 => 91383)


--- trunk/Source/_javascript_Core/wtf/qt/ThreadingQt.cpp	2011-07-20 18:32:54 UTC (rev 91382)
+++ trunk/Source/_javascript_Core/wtf/qt/ThreadingQt.cpp	2011-07-20 18:43:43 UTC (rev 91383)
@@ -255,7 +255,7 @@
 
 bool ThreadCondition::timedWait(Mutex& mutex, double absoluteTime)
 {
-    double currentTime = monotonicallyIncreasingTime();
+    double currentTime = WTF::currentTime();
 
     // Time is in the past - return immediately.
     if (absoluteTime < currentTime)

Modified: trunk/Source/WebCore/ChangeLog (91382 => 91383)


--- trunk/Source/WebCore/ChangeLog	2011-07-20 18:32:54 UTC (rev 91382)
+++ trunk/Source/WebCore/ChangeLog	2011-07-20 18:43:43 UTC (rev 91383)
@@ -1,3 +1,17 @@
+2011-07-20  James Robinson  <[email protected]>
+
+        Revert worker and WebKit2 runloops to use currentTime() for scheduling instead of the monotonic clock
+        https://bugs.webkit.org/show_bug.cgi?id=64841
+
+        Reviewed by Mark Rowe.
+
+        http://trac.webkit.org/changeset/91206 converted most of WebKit's deferred work scheduling to using the
+        monotonic clock instead of WTF::currentTime().  This broke many plugin tests on WebKit2 for reasons that are
+        unclear.  This reverts everything except for WebCore::ThreadTimers back to the previous behavior.
+
+        * workers/WorkerRunLoop.cpp:
+        (WebCore::WorkerSharedTimer::setFireInterval):
+
 2011-07-20  James Simonsen  <[email protected]>
 
         Refuse to run scripts inside the SVG shadow DOM

Modified: trunk/Source/WebCore/workers/WorkerRunLoop.cpp (91382 => 91383)


--- trunk/Source/WebCore/workers/WorkerRunLoop.cpp	2011-07-20 18:32:54 UTC (rev 91382)
+++ trunk/Source/WebCore/workers/WorkerRunLoop.cpp	2011-07-20 18:43:43 UTC (rev 91383)
@@ -53,7 +53,7 @@
 
     // SharedTimer interface.
     virtual void setFiredFunction(void (*function)()) { m_sharedTimerFunction = function; }
-    virtual void setFireInterval(double interval) { m_nextFireTime = interval + monotonicallyIncreasingTime(); }
+    virtual void setFireInterval(double interval) { m_nextFireTime = interval + currentTime(); }
     virtual void stop() { m_nextFireTime = 0; }
 
     bool isActive() { return m_sharedTimerFunction && m_nextFireTime; }

Modified: trunk/Source/WebKit2/ChangeLog (91382 => 91383)


--- trunk/Source/WebKit2/ChangeLog	2011-07-20 18:32:54 UTC (rev 91382)
+++ trunk/Source/WebKit2/ChangeLog	2011-07-20 18:43:43 UTC (rev 91383)
@@ -1,3 +1,19 @@
+2011-07-20  James Robinson  <[email protected]>
+
+        Revert worker and WebKit2 runloops to use currentTime() for scheduling instead of the monotonic clock
+        https://bugs.webkit.org/show_bug.cgi?id=64841
+
+        Reviewed by Mark Rowe.
+
+        http://trac.webkit.org/changeset/91206 converted most of WebKit's deferred work scheduling to using the
+        monotonic clock instead of WTF::currentTime().  This broke many plugin tests on WebKit2 for reasons that are
+        unclear.  This reverts everything except for WebCore::ThreadTimers back to the previous behavior.
+
+        * Platform/CoreIPC/Connection.cpp:
+        (CoreIPC::Connection::waitForMessage):
+        (CoreIPC::Connection::waitForSyncReply):
+        * Platform/RunLoop.h:
+
 2011-07-19  Ryosuke Niwa  <[email protected]>
 
         Build fix after r91307.

Modified: trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp (91382 => 91383)


--- trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp	2011-07-20 18:32:54 UTC (rev 91382)
+++ trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp	2011-07-20 18:43:43 UTC (rev 91383)
@@ -344,7 +344,7 @@
         }
     }
     
-    double absoluteTime = monotonicallyIncreasingTime() + timeout;
+    double absoluteTime = currentTime() + timeout;
     
     std::pair<unsigned, uint64_t> messageAndDestination(std::make_pair(messageID.toInt(), destinationID));
     
@@ -435,7 +435,7 @@
     if (timeout == NoTimeout)
         timeout = 1e10;
 
-    double absoluteTime = monotonicallyIncreasingTime() + timeout;
+    double absoluteTime = currentTime() + timeout;
 
     bool timedOut = false;
     while (!timedOut) {

Modified: trunk/Source/WebKit2/Platform/RunLoop.h (91382 => 91383)


--- trunk/Source/WebKit2/Platform/RunLoop.h	2011-07-20 18:32:54 UTC (rev 91382)
+++ trunk/Source/WebKit2/Platform/RunLoop.h	2011-07-20 18:43:43 UTC (rev 91383)
@@ -58,7 +58,8 @@
     void scheduleWork(PassOwnPtr<WorkItem>);
 
 #if PLATFORM(WIN)
-    // The absoluteTime is in seconds in terms of the monotonic clock. Dispatches sent (not posted) messages to the passed-in
+    // The absoluteTime is in seconds, starting on January 1, 1970. The time is assumed to use the
+    // same time zone as WTF::currentTime(). Dispatches sent (not posted) messages to the passed-in
     // set of HWNDs until the semaphore is signaled or absoluteTime is reached. Returns true if the
     // semaphore is signaled, false otherwise.
     static bool dispatchSentMessagesUntil(const Vector<HWND>& windows, CoreIPC::BinarySemaphore&, double absoluteTime);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to