Tether: Create a workaround for BLE advertisements left dangling.
Because the registration of BluetoothAdvertisements is asynchronous, it is possible for the object which registered it (in this case, a BleAdvertiser::IndividualAdvertisement) to have been destroyed by the time the BluetoothAdvertisement finished registering. Due to crbug.com/741050, this results in a BluetoothAdvertisement without an owner to unregister it eventually, leaving it permanently dangling. This CL works around the issue (until it is resolved) by creating a static method which is available when the registration callback fires. If the IndividualAdvertisement is destroyed when registration is finished, the BluetoothAdvertisement is unregistered. Bug: 739883 Change-Id: I33f210f3bc89504ba670387460b3ffe2ba3fdcf1 Reviewed-on: https://chromium-review.googlesource.com/567561 Commit-Queue: Ryan Hansberry <hansberry@chromium.org> Reviewed-by:Kyle Horimoto <khorimoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#486543}
Showing
Please register or sign in to comment