Connection::waitForSyncReply() uses wall time clock for timeout
https://bugs.webkit.org/show_bug.cgi?id=198712
Due to a nature of the system time (it might not be set, jump, be off
by a lot) it is better to use monotonically increasing time which is
exactly what's used in a similar place i.e. Connection::waitForMessage()
Patch by Pawel Stanek <p.stanek@metrological.com> on 2019-07-12
Reviewed by Alex Christensen.
* Platform/IPC/Connection.cpp:
(IPC::Connection::waitForSyncReply):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@247392 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog
index f5da86c..4c0c3f1 100644
--- a/Source/WebKit/ChangeLog
+++ b/Source/WebKit/ChangeLog
@@ -1,3 +1,16 @@
+2019-07-12 Pawel Stanek <p.stanek@metrological.com>
+
+ Connection::waitForSyncReply() uses wall time clock for timeout
+ https://bugs.webkit.org/show_bug.cgi?id=198712
+ Due to a nature of the system time (it might not be set, jump, be off
+ by a lot) it is better to use monotonically increasing time which is
+ exactly what's used in a similar place i.e. Connection::waitForMessage()
+
+ Reviewed by Alex Christensen.
+
+ * Platform/IPC/Connection.cpp:
+ (IPC::Connection::waitForSyncReply):
+
2019-07-12 Timothy Hatcher <timothy@apple.com>
Drop DarkModeCSSEnabled as an experimental feature and always enable it.
diff --git a/Source/WebKit/Platform/IPC/Connection.cpp b/Source/WebKit/Platform/IPC/Connection.cpp
index 2d0403c..8f69c87 100644
--- a/Source/WebKit/Platform/IPC/Connection.cpp
+++ b/Source/WebKit/Platform/IPC/Connection.cpp
@@ -590,7 +590,7 @@
std::unique_ptr<Decoder> Connection::waitForSyncReply(uint64_t syncRequestID, Seconds timeout, OptionSet<SendSyncOption> sendSyncOptions)
{
timeout = timeoutRespectingIgnoreTimeoutsForTesting(timeout);
- WallTime absoluteTime = WallTime::now() + timeout;
+ MonotonicTime absoluteTime = MonotonicTime::now() + timeout;
willSendSyncMessage(sendSyncOptions);