memory-infra: Fix deadlock in MemoryDumpManager

When we destroy a memory dump manager (MDM is a singleton so this only
happens in tests) we attempt to stop the thread under the lock. This
can lead to a deadlock if there are outstanding tasks which also try to
take the lock. Instead we should get a pointer to the thread under the
lock, stop the thread, then finally reset the pointer which is what this
CL does.

BUG=721072

Review-Url: https://codereview.chromium.org/2881563002
Cr-Commit-Position: refs/heads/master@{#470989}


CrOS-Libchrome-Original-Commit: f1610b19b843e8cdc00a215074f9c9e04de9dd17
1 file changed
tree: 43c1987e765c4a31c84434f46d72e437495a19da
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/