• Fergus Dall's avatar
    VCD: Fix DCHECK failure in RegisterClientWithToken · 662332c4
    Fergus Dall authored
    RegisterClientWithToken posts a task to |proxy_thread_| which does the
    actual work and runs the callback. But the callback is the response to
    a mojo message that must only be run on the sequence that created
    it. This causes a DCHECK failure in mojo::ResponderThunk::Accept.
    
    Fix this by having RegisterClientWithTokenOnProxyThread post a task
    back to the original sequence to actually run the callback.
    
    Also have RegisterClientWithTokenOnProxyThread call
    AddClientObserverOnProxyThread directly instead of going via
    AddClientObserver, as it is already running on the right thread anyway.
    
    This issue appears to have been introduced in CL:2501104
    
    Bug: none
    Change-Id: I4ae88c0c508e9120be7526c7b46c492592176500
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2583596
    Commit-Queue: Fergus Dall <sidereal@google.com>
    Commit-Queue: Wei Lee <wtlee@chromium.org>
    Reviewed-by: default avatarWei Lee <wtlee@chromium.org>
    Auto-Submit: Fergus Dall <sidereal@google.com>
    Cr-Commit-Position: refs/heads/master@{#835604}
    662332c4
camera_hal_dispatcher_impl.cc 22.9 KB