• Ken Rockot's avatar
    [mojo] Fix sync calls on SharedRemote · 5e23e598
    Ken Rockot authored
    This fixes some edge cases which can cause SharedRemote to either block
    unnecessarily on its bound sequence or fail to block as intended on its
    bound sequence, depending on how it's constructed and called into.
    
    We want to repurpose the underlying Remote's sync waiting behavior when
    the SharedRemote makes a sync call from the bound sequence, but when a
    call is made from any other sequence, the SharedRemote must implement
    its own waiting mechanism.
    
    This change ensures that SharedRemote configures its underlying Remote
    to disable sync waiting by default, and it's selectively re-enabled only
    around any (potentially nested) sync calls made from the bound sequence.
    
    Fixed: 1102921
    Change-Id: I603e48e38d859c43d7b732a91445314714ea0591
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2286051
    Commit-Queue: Ken Rockot <rockot@google.com>
    Reviewed-by: default avatarErik Chen <erikchen@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#786180}
    5e23e598
ipc_channel_mojo.cc 11.9 KB