-
Reilly Grant authored
BluetoothAdapter::OnDiscoveryChangeComplete() needs to be able to handle the case where a callback destroys the BluetoothAdapter. This issue was not noticed in tests because TestBluetoothAdapter takes a reference to the BluetoothAdapter when executing these callbacks. It has been updated to use a WeakPtr as the real backends do. I noticed that both BluetoothAdapter and nearly all of its subclasses have a WeakPtrFactory. The factory in the base class has been removed and subclasses are required to provide their own. Bug: 1025067 Change-Id: I91f952e01fd3bda618455f294ce0cba2e2a7dad1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1922298 Commit-Queue: Reilly Grant <reillyg@chromium.org> Reviewed-by:
Ovidio de Jesús Ruiz-Henríquez <odejesush@chromium.org> Cr-Commit-Position: refs/heads/master@{#716465}
b8ffd1e0