• btolsch's avatar
    Remove UI thread WeakPtrFactory from DialService · 84fe619b
    btolsch authored
    A previous change to use the network service introduced two
    WeakPtrFactory members to DialServiceImpl.  Although this gets around
    the advice to only use WeakPtrs from one factory on a single sequence,
    it doesn't actually solve the problem: ~DialServiceImpl still runs on
    the IO thread, which may cause some UI thread WeakPtrs to be
    invalidated, resulting in a DCHECK (or a race).  The UI thread doesn't
    actually need any of DialServiceImpl's data though, so this change just
    makes the functions previously using it into free functions which then
    call back onto the IO thread with a proper WeakPtr.
    
    Bug: 934611, 936531
    Change-Id: Iee1612cd9934bef109bbfa79d497685dbd275d8a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1504980
    Commit-Queue: Brandon Tolsch <btolsch@chromium.org>
    Reviewed-by: default avatarmark a. foltz <mfoltz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#638283}
    84fe619b
dial_service.cc 21.5 KB