Fix ipc::ChannelMojo not to call GetWeakPtr() from multiple threads.

ipc::ChannelMojo calls GetWeakPtr() to bind WeakPtrs into helpers
returned by CreateThreadSafeChannel(), and in OnPipeError().

Since these calls can be made concurrently from different threads, they
should create a WeakPtr at initialization to use in those calls.

Bug: 
Change-Id: I8a86c4e7241314b3aa23dba9915c14d1cb078d31
Reviewed-on: https://chromium-review.googlesource.com/742498
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512513}

CrOS-Libchrome-Original-Commit: 888ef82fea43a33ac86c4b7e2bfc554184133757
2 files changed
tree: 322c574c87eddef5374e19f87ba13bc5b73d755b
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/