| commit | 90f5556e5feb18e8537b8b0eaf4b11b6e3557d34 | [log] [tgz] | 
|---|---|---|
| author | Ryan Hansberry <hansberry@chromium.org> | Thu Oct 10 22:39:34 2019 | 
| committer | Commit Bot <commit-bot@chromium.org> | Thu Oct 10 22:39:34 2019 | 
| tree | 82b081f9d0ccb0e4af16d2e806a29d87eb8a58a6 | |
| parent | 9c8bdaaa30353dc984856504aa1ab5395686dfc6 [diff] | 
[Bluetooth] Remove IsDiscovering() check in StopScan().
Always request bluez to stop discovery; do not gate on whether or not
discovery is active.
The recent refactor crrev.com/c/1699214 in BluetoothAdapter and its
children classes resurfaced a buggy implementation of
BluetoothAdapterBluez::IsDiscovering() (crbug.com/905374) -- its
implementation in bluez can sometimes return an incorrect value. In this
particular bug, crbug.com/1013020, when ARC++ spammed BluetoothAdapterBluez
with too many Start/Stop scan calls, we entered a racy situation in which
ARC++ called StopScan(), and that StopScan() incorrectly early-returned,
failing to stop discovery, because BluetoothAdapterBluez::IsDiscovering()
incorrectly returned 'false'.
      the repro steps described in crbug.com/1013020.
Bug: 1013020, 822104, 905374
TEST: Manaully verified 5 times on both M78 branch and ToT following
Change-Id: Ide80706d77f1659cc07f457c4a524d823141f2c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1854459
Commit-Queue: Ryan Hansberry <hansberry@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704863}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .