Make ChannelMojoHost::ChannelDelegate a RefContedThreadSafe
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}
Showing
Please register or sign in to comment