Skip to content
  • dzhioev's avatar
    Fixed member use after destruction in BarrierClosure. · 0a3f459d
    dzhioev authored
    If client releases BarrierClosure during |done_closure_| invocation, the closure
    is destructed together with BarrierInfo object that it owns. After that
    BarrierInfo tries to call |done_closure_.Reset()| which leads to SIGSEGV.
    Fixed that by saving |done_clusure| to a stack variable.
    
    BUG=none
    TEST=base_unittests --gtest_filter=BarrierClosureTest.KeepingClosureAliveUntilDone
    
    Review URL: https://codereview.chromium.org/1116833002
    
    Cr-Commit-Position: refs/heads/master@{#328669}
    0a3f459d