Floss: prevent sequence checker crashes with |Start/StopAudioTicks|
The weak pointer to |worker_thread_| is generated in the main thread (via |ConfirmStreamRequest| -> |StartAudioTicks| -> |audio_timer_.SchedulePeriodic(worker_thread->GetWeakPtr(), ...)|), but |SchedulePeriodic| will result in dereferencing that weak pointer in its later recurring tasks within the |worker_thread_|. This violates the requirement where this |WeakPtr| should only be dereferenced (or even null-checked) on the same sequence where it is created. This CL fixes the ownership of the thread similar to how |btif_a2dp_source_start_audio_req| invokes the periodic function. Bug: 319377916 Bug: 325984257 Test: m Bluetooth Change-Id: Id79c5960491d2ef8b3586268306e3438f6288785
Loading
Please register or sign in to comment