• morrita's avatar
    Make ChannelMojoHost::ChannelDelegate a RefContedThreadSafe · 70b91498
    morrita authored
    ChannelDelegate::GetWeakPtr() was called from the UI thread but
    it was racy as the weak ptr is also used in the IO thread.
    This CL turns ChannelDelegate a ThreadSafeRefCounted so that
    we can pass ChannelDelegate itself to the task runner, instead
    of using its weak ptr on the UI thread.
    
    This change also turns some TaskRunner declarations to
    SequencedTaskRunner to access its DeleteSoon() API from
    ChannelDelegate.
    
    TBR=creis@chromium.org
    R=viettrungluu@chrormium.org, agl@chromium.org
    BUG=460243
    
    Review URL: https://codereview.chromium.org/955813002
    
    Cr-Commit-Position: refs/heads/master@{#318994}
    70b91498
ipc_channel_mojo_host.h 1.33 KB