Skip to content
  • fdoray's avatar
    Make ThreadChecker::CalledOnValidThread() return true when called from the same task. · b339954b
    fdoray authored
    This CL introduces TaskToken to identify individual tasks. In the scope
    of a ScopedSetSequenceTokenForCurrentThread, a unique TaskToken is set
    in TLS. This unique TaskToken can be retrieved using
    TaskToken::GetForCurrentThread().
    
    ThreadCheckerImpl uses TaskToken to make CalledOnValidThread() return
    true when called multiple times from the same task. This allows usage
    of ThreadChecker/NonThreadSafe objects from the stack on tasks not
    otherwise running in a single-threaded context.
    
    BUG=553459
    
    Review-Url: https://codereview.chromium.org/2213263002
    Cr-Commit-Position: refs/heads/master@{#410839}
    b339954b