DescriptionMake ThreadChecker::CalledOnValidThread() return true when called from the same task.
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
Committed: https://crrev.com/b339954beda5b00c4a482d74594cbe2e7cd39516
Cr-Commit-Position: refs/heads/master@{#410839}
Patch Set 1 #Patch Set 2 : add missing files #Patch Set 3 : similarity #
Total comments: 18
Patch Set 4 : CR gab #4 #Patch Set 5 : self-review #Patch Set 6 : self-review #
Total comments: 2
Patch Set 7 : CR gab #6 (fix comment) #
Total comments: 4
Dependent Patchsets: Messages
Total messages: 29 (12 generated)
|