Skip to content
  • tzik's avatar
    Destroy bound callback to BindToCurrentLoop on the target task runner · 2b817313
    tzik authored
    A callback object bound by BindToCurrentLoop runs on the target thread,
    but the callback itself was not necessarily destroyed on the target
    thread. That causes a data race when a non-thread-safe RefCounted objects
    is bound to the callback. (E.g. a BindToCurrentLoop call for PPB_Buffer
    in content::ContentDecryptorDelegate::DeliverFrame().)
    
    This CL refactors BindToCurrentLoop and adds a clean up task to mitigate
    the racy usage.
    
    BUG=688072
    
    Review-Url: https://codereview.chromium.org/2712603002
    Cr-Commit-Position: refs/heads/master@{#454212}
    2b817313