[WK2] Sync messages with with non-default timeout sent from secondary threads always...
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Aug 2013 21:36:41 +0000 (21:36 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Aug 2013 21:36:41 +0000 (21:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=119767

Fix by Justin Bur.
Reviewed by Darin Adler.

* Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::sendSyncMessageFromSecondaryThread):
The argument to wait() is absolute time, not a delta. This calculation matches one
in Connection::waitForMessage().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154073 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/Platform/CoreIPC/Connection.cpp

index 27195ea..0d9048e 100644 (file)
@@ -1,3 +1,15 @@
+2013-08-14  Alexey Proskuryakov  <ap@apple.com>
+
+        [WK2] Sync messages with with non-default timeout sent from secondary threads always time out
+        https://bugs.webkit.org/show_bug.cgi?id=119767
+
+        Fix by Justin Bur.
+        Reviewed by Darin Adler.
+
+        * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::sendSyncMessageFromSecondaryThread):
+        The argument to wait() is absolute time, not a delta. This calculation matches one
+        in Connection::waitForMessage().
+
 2013-08-14  Tim Horton  <timothy_horton@apple.com>
 
         REGRESSION (r153877): Plugin scanning slows creation of WebViews
 2013-08-14  Tim Horton  <timothy_horton@apple.com>
 
         REGRESSION (r153877): Plugin scanning slows creation of WebViews
index b3afee2..170ec32 100644 (file)
@@ -511,7 +511,7 @@ PassOwnPtr<MessageDecoder> Connection::sendSyncMessageFromSecondaryThread(uint64
     if (timeout == NoTimeout)
         timeout = 1e10;
 
     if (timeout == NoTimeout)
         timeout = 1e10;
 
-    pendingReply.semaphore.wait(timeout);
+    pendingReply.semaphore.wait(currentTime() + timeout);
 
     // Finally, pop the pending sync reply information.
     {
 
     // Finally, pop the pending sync reply information.
     {