| Index: JavaScriptCore/wtf/ThreadingQt.cpp
|
| ===================================================================
|
| --- JavaScriptCore/wtf/ThreadingQt.cpp (revision 10232)
|
| +++ JavaScriptCore/wtf/ThreadingQt.cpp (working copy)
|
| @@ -242,11 +242,13 @@
|
| if (absoluteTime < currentTime)
|
| return false;
|
|
|
| + // Time is too far in the future (and would overflow unsigned long) - wait forever.
|
| + if (absoluteTime - currentTime > static_cast<double>(INT_MAX) / 1000.0) {
|
| + wait(mutex);
|
| + return true;
|
| + }
|
| +
|
| double intervalMilliseconds = (absoluteTime - currentTime) * 1000.0;
|
| - // Qt defines wait for up to ULONG_MAX milliseconds.
|
| - if (intervalMilliseconds >= ULONG_MAX)
|
| - intervalMilliseconds = ULONG_MAX;
|
| -
|
| return m_condition->wait(mutex.impl(), static_cast<unsigned long>(intervalMilliseconds));
|
| }
|
|
|
|
|