Track adapter map stress test added and invalid thread checks removed.
WebRtcMediaStreamTrackAdapterMapStressTest added due to https://crbug.com/813574. This continuously creates and destroys local and remote track adapters concurrently in an attempt to cause a deadlock if possible (hopefully not). This also removes some invalid thread checks at the destructor of ~WebRtcMediaStreamTrackAdapter and ~WebRtcMediaStreamAdapterMap. The first of which made the stress test flaky (https://crbug.com/826365). The adapter's DCHECK was invalid because the remote audio track's Dispose (which properly DCHECKs that it is invoked on the main thread) can jump to the signaling thread and back with a reference to the adapter. It is possible for the signaling thread's task to be the last reference to the adapter. Similarly, WebRtcMediaStreamAdapterMap is reference counted and tasks referencing on different threads could make which thread references it last racy. We don't care which thread was the last reference as long as it is empty (which it is if and only if all adapters have been destroyed on the appropriate threads). Bug: 827450 Change-Id: I5f819948fc2148e810f343e027fa8011b03d2335 Reviewed-on: https://chromium-review.googlesource.com/983553Reviewed-by:Guido Urdaneta <guidou@chromium.org> Commit-Queue: Henrik Boström <hbos@chromium.org> Cr-Commit-Position: refs/heads/master@{#551413}
Showing
Please register or sign in to comment