• Ahmed Fakhry's avatar
    Task Manager: Speculative crash fix · 280a3b3f
    Ahmed Fakhry authored
    It's not clear to me why calling base::ThreadTaskRunnerHandle::Get()
    from ArcProcessTaskProvider::ScheduleNextRequest() would fail,
    especially since this is happening on the UI thread. But I added a few
    things that may fix the issue:
    - I noticed that ArcProcessService dtor may be called, but we did't
      stop observing the ProcessSnapshotServer.
    - When the task manager is closed, let's invalidate all the weak_ptrs of
      ArcProcessTaskProvider, so we don't get any pending requested from
      ArcProcessService after that.
    
    BUG=1136378
    
    Change-Id: Icdbc8161e397899a2decd7efac13a39462bb6d71
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2536812Reviewed-by: default avatarWillie Koomson <wvk@google.com>
    Commit-Queue: Ahmed Fakhry <afakhry@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#827898}
    280a3b3f
arc_process_service.cc 19.4 KB