Protect mock time variables in TestMockTimeTaskRunner by a lock
|now_| and |now_ticks_| in TestMockTimeTaskRunner were read or written without a lock. So, when PostDelayedTask() and NowTicks() are called on different threads, it hits TSan failure. This CL adds lock for all access to them to avoid the data race. Change-Id: I562e2bfbd46b481b41faa05906b19c8664654812 Reviewed-on: https://chromium-review.googlesource.com/798819Reviewed-by:Daniel Cheng <dcheng@chromium.org> Commit-Queue: Taiju Tsuiki <tzik@chromium.org> Cr-Commit-Position: refs/heads/master@{#520779}
Showing
Please register or sign in to comment