| Index: third_party/crashpad/crashpad/util/synchronization/semaphore_win.cc
|
| diff --git a/third_party/crashpad/crashpad/util/synchronization/semaphore_win.cc b/third_party/crashpad/crashpad/util/synchronization/semaphore_win.cc
|
| index 962c7baeac6aa09a4aad20dbab982d7acfba7820..2f26c2379b1213c2f505e0d6611d7f71a2941bfc 100644
|
| --- a/third_party/crashpad/crashpad/util/synchronization/semaphore_win.cc
|
| +++ b/third_party/crashpad/crashpad/util/synchronization/semaphore_win.cc
|
| @@ -14,6 +14,7 @@
|
|
|
| #include "util/synchronization/semaphore.h"
|
|
|
| +#include <cmath>
|
| #include <limits>
|
|
|
| #include "base/logging.h"
|
| @@ -38,6 +39,12 @@ void Semaphore::Wait() {
|
|
|
| bool Semaphore::TimedWait(double seconds) {
|
| DCHECK_GE(seconds, 0.0);
|
| +
|
| + if (std::isinf(seconds)) {
|
| + Wait();
|
| + return true;
|
| + }
|
| +
|
| DWORD rv = WaitForSingleObject(semaphore_, static_cast<DWORD>(seconds * 1E3));
|
| PCHECK(rv == WAIT_OBJECT_0 || rv == WAIT_TIMEOUT) << "WaitForSingleObject";
|
| return rv == WAIT_OBJECT_0;
|
|
|