• Dan Sanders's avatar
    Detect reentrancy in MojoVideoDecoder::Stop(). · 1c0c058e
    Dan Sanders authored
    DecoderSelector provides an InitCB that destroys the VideoDecoder
    immeidately when initialization fails. This means that |this| is
    invalidated immedately upon calling |init_cb_| in MojoVideoDecoder.
    
    This CL adds a WeakPtr-based test for |this| destruction to the
    potentially problematic callbacks in MojoVideoDecoder::Stop().
    
    Bug: 839881
    Change-Id: I9b1302ad3007a834c95ed1d3845e24b0d07158f8
    Reviewed-on: https://chromium-review.googlesource.com/1169907Reviewed-by: default avatarFrank Liberato <liberato@chromium.org>
    Commit-Queue: Dan Sanders <sandersd@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#581954}
    1c0c058e
mojo_video_decoder.cc 13.7 KB