Fix crash in InvokeOnMemoryDump when tracing

Fixes a bug in ProcessMetricsMemoryDumpProvider::RegisterForProcess
where if we get a duplicate pid we register an MDP but then immediately
destroy it. This later causes a crash. Instead we should not register
the MDP if we get a duplicate pid. This won't help the root problem
of why we are getting duplicate pids which will now just cause
information loss instead of crashing.

BUG=695731

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


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