blink: Add thread annotation to platform.
Replaces comments with annotations for variables protected by mutexes in blink/platform. This allows the static analysis pass in clang to check locking at compile time. Changes are: - Annotate member variables with GUARDED_BY() - Add a few Mutex::AssertAcquired() assertions. These mark the mutex as acquired to the checker, and do not generate any code when DCHECK()s are off. - Add required locking to some unit tests only methods. The code wasn't incorrect before as these are typically single-threaded, but this is still required in principle. While in the neighborhood, also fix a few "git cl lint warnings": missing include guards comments, explicit constructors, and include what you use. Bug: 1013082 Change-Id: If957288537f1930f821f94296dd89e5525649ed2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1851709 Commit-Queue: Benoit L <lizeb@chromium.org> Reviewed-by:Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#705040}
Showing
Please register or sign in to comment