assistant: fix potential restart crash

It seems possible that there maybe a race condition with random
libassistant restarts.  If one libassistant started and posted
|OnStartFinished| task to mainthread, but before the task runs
the libassistant was stopped. The future |OnStartFinished| may
crash.

Bug: 973656
Test: locally build and run, try to repro crash
Change-Id: I5a4b1d0a45503b44df5bf7fdcce4ad750099d656
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1685686
Reviewed-by: Yue Li <updowndota@chromium.org>
Commit-Queue: Xiaohui Chen <xiaohuic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#674235}
1 file changed