• Erik Chen's avatar
    lacros: Fix potential deadlocks involving lacros-chrome-service. · be2285b3
    Erik Chen authored
    lacros-chrome is allowed to make synchronous mojo IPC calls to
    ash-chrome. To avoid deadlocks, the sequence responsible for handling
    lacros-chrome mojo IPC must never block. Prior to this CL, the class
    LacrosChromeServiceImpl was affine to the main-thread, which could and
    did block. See bug for a concrete example of a deadlock.
    
    This CL create a new private class
    LacrosChromeServiceNeverBlockingState. This class is affine to a
    never-blocking sequence. Most state has been moved from
    LacrosChromeServiceImpl to the private class. The exception is the public
    endpoint mojo::Remote<crosapi::mojom::SelectFile>, which is affine to
    the main thread.
    
    Bug: 1103765
    Change-Id: I462311f7b2b68db5eeaab799a83d2bb6391dc575
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2293011
    Commit-Queue: Erik Chen <erikchen@chromium.org>
    Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
    Reviewed-by: default avatarHidehiko Abe <hidehiko@chromium.org>
    Auto-Submit: Erik Chen <erikchen@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#788810}
    be2285b3
README.md 367 Bytes