Revert "Address race between device notifications and enumerations in AudioDeviceListenerMac"
This reverts commit 01694e80. Reason for revert: Does not fix the bug it intended to fix. Reverting will facilitate merging of an alternative patch. Original change's description: > Address race between device notifications and enumerations in AudioDeviceListenerMac > > Originally AudioDeviceListenerMac assumed that once CoreAudio reports that a device does not exist, > it was no longer possible to get notifications related to that device, so it was safe to remove > the listener for that device. > However, since notifications can come from multiple threads and the corresponding callbacks make > a thread jump, we have observed that it is indeed possible to get notifications about removed devices > which can lead to a crash if the listener for that notification has been removed. > To address this issue, this CL does not remove listeners when the device is removed, but instead > marks the listener as deleted and posts a task to remove listeners that have been marked as deleted > for several seconds, at a time when we can confidently no longer expect notifications from the removed device. > > Bug: 911311 > Change-Id: I07cc9c8e24a0cfdfadcc04d0e8bd33e14ab61422 > Reviewed-on: https://chromium-review.googlesource.com/c/1363187 > Commit-Queue: Guido Urdaneta <guidou@chromium.org> > Reviewed-by: Oskar Sundbom <ossu@chromium.org> > Reviewed-by: Olga Sharonova <olka@chromium.org> > Cr-Commit-Position: refs/heads/master@{#614391} TBR=guidou@chromium.org,olka@chromium.org,ossu@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 911311 Change-Id: Ic05d999b32ddb308649384ae29c1721d595e6347 Reviewed-on: https://chromium-review.googlesource.com/c/1373840Reviewed-by:Guido Urdaneta <guidou@chromium.org> Commit-Queue: Guido Urdaneta <guidou@chromium.org> Cr-Commit-Position: refs/heads/master@{#615908}
Showing
Please register or sign in to comment