Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Unified Diff: JavaScriptCore/wtf/ThreadingQt.cpp

Issue 28077: WebKit side of merge from r41149 to r41181. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/WebKit/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « JavaScriptCore/wtf/MessageQueue.h ('k') | JavaScriptCore/wtf/ThreadingWin.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « JavaScriptCore/wtf/MessageQueue.h ('k') | JavaScriptCore/wtf/ThreadingWin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698