• Konstantin Ganenko's avatar
    Fix using CompletionHandler after deleting · aba55d24
    Konstantin Ganenko authored
    CompletionHandler is used in CacheThread_BlockFile.
    CacheThread_BlockFile is lazy + leaky instance, thus, there was race
     condition when all lazy instances are already destroyed, but message
     io pump still processes some io overlapped operation,leading to using
     IOHandler after free.
    Make completion handler to be refcounted and add ref to each overlapped
     operation it participates with.
    
    R=jkarlin@chromium.org, morlovich@chromium.org
    
    Bug: 
    Change-Id: I7bd5fbdc83aae05489d5089ee16a94857ea1b104
    Reviewed-on: https://chromium-review.googlesource.com/793158Reviewed-by: default avatarMaks Orlovich <morlovich@chromium.org>
    Commit-Queue: Maks Orlovich <morlovich@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#523556}
    aba55d24
file_win.cc 8.06 KB