• sonnysasaka's avatar
    PostTask MaybeReleaseAdapter in BluetoothEventRouter::AdapterDiscoveringChanged · 518c599b
    sonnysasaka authored
    Calling MaybeReleaseAdapter directly from
    BluetoothEventRouter::AdapterDiscoveringChanged could be a problem since
    this can happen:
    BluetoothAdapterBlueZ::AdapterPropertyChanged ->
    BluetoothAdapterBlueZ::DiscoveringChanged ->
    BluetoothEventRouter::AdapterDiscoveringChanged -> MaybeReleaseAdapter
    
    If BluetoothEventRouter is the only pointer holder left then the caller
    of BluetoothEventRouter::AdapterDiscoveringChanged could be gone even
    before that function returns.
    
    BUG=710216
    
    Review-Url: https://codereview.chromium.org/2852773002
    Cr-Commit-Position: refs/heads/master@{#468180}
    518c599b
bluetooth_event_router.cc 18.1 KB