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

Unified Diff: JavaScriptCore/wtf/ThreadingWin.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/ThreadingQt.cpp ('k') | WebCore/ChangeLog » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: JavaScriptCore/wtf/ThreadingWin.cpp
===================================================================
--- JavaScriptCore/wtf/ThreadingWin.cpp (revision 10232)
+++ JavaScriptCore/wtf/ThreadingWin.cpp (working copy)
@@ -457,10 +457,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;
- if (intervalMilliseconds >= INT_MAX)
- intervalMilliseconds = INT_MAX;
-
return m_condition.timedWait(mutex.impl(), static_cast<unsigned long>(intervalMilliseconds));
}
« no previous file with comments | « JavaScriptCore/wtf/ThreadingQt.cpp ('k') | WebCore/ChangeLog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698