Description[Remoting Android] Fix OAuthTokenConsumer's thread safety issue
OAuthTokenConsumer.revokeLatestToken() revokes the token on the background
thread and calls the callback directly on that thread once it is done. This
would be potentially thread unsafe if the caller doesn't realize the callback
will be called on a non-main thread. Currently we don't see any bug related
to this problem since the only caller of revokeLatestToken() passes in null
as the callback.
This CL makes revokeLatestToken() post a task to the main thread to run the
callback when the token is revoked.
Committed: https://crrev.com/e8f9faf5a2ace617a7ce1d775c96ead0df0a76d4
Cr-Commit-Position: refs/heads/master@{#414268}
Patch Set 1 #
Messages
Total messages: 10 (5 generated)
|