Fixing a couple cases that cause ProcessAllMessageQueues to hang.
The two situations are:
1. A thread is in the process of shutting down, so it won't handle any
more messages.
2. A message queue is cleared before it has a chance to process pending
messages.
In both of those cases, we should consider processing done at that
point.
R=honghaiz@webrtc.org, pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/2319303004 .
Cr-Original-Commit-Position: refs/heads/master@{#14245}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: fe7d091f57707efdb43f9c83470203369e59cfea
2 files changed