New issue
Advanced search Search tips

Issue 901136 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug
Proj-VR
Proj-XR
Proj-XR-VR



Sign in to add a comment

Use GUARDED_BY for locks in VR code

Project Member Reported by bsheedy@chromium.org, Nov 1

Issue description

In at least the VR desktop test code, we have a field guarded by a base::Lock. The current recommendation is to use the GUARDED_BY macro for fields like this in order to catch accessing without acquiring at compile time, which we currently aren't doing.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6c444ade4c0264345962e593884bf4a846b742ca

commit 6c444ade4c0264345962e593884bf4a846b742ca
Author: bsheedy <bsheedy@chromium.org>
Date: Fri Nov 02 00:28:54 2018

Use GUARDED_BY in VR test code

Uses the GUARDED_BY annotation for the field we have protected by a
base::Lock in the VR browser test code.

As a result, switches all lock acquiring to AutoLock since the
annotation doesn't currently work with manually acquiring and
releasing.

Bug:  901136 
Change-Id: I62b7726ca4ad56778b0354436a8f6d84f47fe86b
Reviewed-on: https://chromium-review.googlesource.com/c/1313752
Reviewed-by: Bill Orr <billorr@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604767}
[modify] https://crrev.com/6c444ade4c0264345962e593884bf4a846b742ca/device/vr/openvr/test/test_helper.cc
[modify] https://crrev.com/6c444ade4c0264345962e593884bf4a846b742ca/device/vr/openvr/test/test_helper.h

Status: Fixed (was: Assigned)

Sign in to add a comment