• Jasmine Chen's avatar
    VCD: Initialize active client observer · 9c93c34e
    Jasmine Chen authored
    This CL fixes an issue where the scoped_ref base::ObserverListThreadSafe
    isn't initialized, causing chrome to crash immediately following
    CameraHalDispatcherImpl::AddActiveClientObserver().
    It also adds a unittest to make sure the observer works.
    
    Bug: 1155159
    Test: Create an observer in camera_hal_delegate.cc and verify that the
    observer is registered and receives updates. \
      (DUT) $ capture_unittests --gtest_filter='*Dispatcher*'
    
    Change-Id: I54a8a77a2b48eb328ca2c1f0a2fb3ce057f66b31
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2575297Reviewed-by: default avatarWei Lee <wtlee@chromium.org>
    Commit-Queue: Wei Lee <wtlee@chromium.org>
    Auto-Submit: Jasmine Chen <lnishan@google.com>
    Cr-Commit-Position: refs/heads/master@{#834553}
    9c93c34e
camera_hal_dispatcher_impl.cc 22.8 KB