mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-31 01:43:03 +08:00
bc5b7b06db
WorkDelegate::DoWork() can be called more times than the value set by WorkDelegate::SetDesiredWorkCount(). The main test thread may not be able to “squeeze” its call to WorkerThread::Stop() in after its WorkDelegate::WaitForWorkCount() returns. If the worker thread cannot be stopped in time, one or more additional iterations of WorkDelegate::DoWork() can run. WorkDelegate::DoWork() should take care to not increment work_count_ beyond the desired value. Bug: crashpad:169 Test: crashpad_util_test WorkerThread.* Change-Id: I9e261a2a8a57420e12c0f1c9abd0ee6304dacd53 Reviewed-on: https://chromium-review.googlesource.com/456821 Reviewed-by: Robert Sesek <rsesek@chromium.org>