• Adam Langley's avatar
    webauthn: DCHECK that device callbacks don't hairpin. · 457e24ff
    Adam Langley authored
    Since |u2f_request_| is assigned to the result of |TryRegistration| /
    |TrySign|, if the given callback is called immediately then |Cleanup|
    can have run and completed before |u2f_request_| is assigned. That
    leaves |AuthenticatorImpl| in an invalid state and it'll no longer
    process any requests.
    
    None of the existing callbacks do this, so this change just adds DCHECKs
    to help anyone else who might hit this in the future.
    
    Change-Id: I139a0825c6231c438dc9e469f9b188eddb6000e0
    Reviewed-on: https://chromium-review.googlesource.com/961788
    Commit-Queue: Balazs Engedy <engedy@chromium.org>
    Reviewed-by: default avatarBalazs Engedy <engedy@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#543036}
    457e24ff
authenticator_impl.cc 25.6 KB