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

Unified Diff: third_party/crashpad/crashpad/util/synchronization/semaphore_posix.cc

Issue 2825103002: Update Crashpad to b8aaa22905308cc400f880006a84dddac834bd6b (Closed)
Patch Set: Created 3 years, 8 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
Index: third_party/crashpad/crashpad/util/synchronization/semaphore_posix.cc
diff --git a/third_party/crashpad/crashpad/util/synchronization/semaphore_posix.cc b/third_party/crashpad/crashpad/util/synchronization/semaphore_posix.cc
index 973f0a5d503df575e3f0b24f3397abc3e6a5168e..c781e4c6f2233a4b2049883285cfd2967d399545 100644
--- a/third_party/crashpad/crashpad/util/synchronization/semaphore_posix.cc
+++ b/third_party/crashpad/crashpad/util/synchronization/semaphore_posix.cc
@@ -39,6 +39,12 @@ void Semaphore::Wait() {
bool Semaphore::TimedWait(double seconds) {
DCHECK_GE(seconds, 0.0);
+
+ if (std::isinf(seconds)) {
+ Wait();
+ return true;
+ }
+
timespec timeout;
timeout.tv_sec = seconds;
timeout.tv_nsec = (seconds - trunc(seconds)) * 1E9;

Powered by Google App Engine
This is Rietveld 408576698