webauth: fix potential use-after-free in VirtualFidoDiscovery

VirtualFidoDiscovery posts a callback that's strongly bound to itself.
However, the request might be terminated before the task is executed
which would delete the discovery and result in a use-after-free. Use a
WeakPtr instead.

Bug: n/a
Change-Id: I841390b38b0485c0dc59f243dbd715af76c9956e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1584437
Auto-Submit: Martin Kreichgauer <martinkr@google.com>
Reviewed-by: Adam Langley <agl@chromium.org>
Commit-Queue: Martin Kreichgauer <martinkr@google.com>
Cr-Commit-Position: refs/heads/master@{#654308}
2 files changed