| Index: base/metrics/field_trial.h
|
| diff --git a/base/metrics/field_trial.h b/base/metrics/field_trial.h
|
| index 8a84baea34e338ec3d449cda5c4010f11595ea01..866d9f70f32fd4c7c0b40c7b0f85b69d80efed8e 100644
|
| --- a/base/metrics/field_trial.h
|
| +++ b/base/metrics/field_trial.h
|
| @@ -63,6 +63,7 @@
|
| #include <string>
|
| #include <vector>
|
|
|
| +#include "base/atomicops.h"
|
| #include "base/base_export.h"
|
| #include "base/command_line.h"
|
| #include "base/feature_list.h"
|
| @@ -143,8 +144,11 @@ class BASE_EXPORT FieldTrial : public RefCounted<FieldTrial> {
|
| static constexpr size_t kExpectedInstanceSize = 8;
|
|
|
| // Whether or not this field trial is activated. This is really just a
|
| - // boolean but marked as a uint32_t for portability reasons.
|
| - uint32_t activated;
|
| + // boolean but using a 32 bit value for portability reasons. It should be
|
| + // accessed via NoBarrier_Load()/NoBarrier_Store() to prevent the compiler
|
| + // from doing unexpected optimizations because it thinks that only one
|
| + // thread is accessing the memory location.
|
| + subtle::Atomic32 activated;
|
|
|
| // Size of the pickled structure, NOT the total size of this entry.
|
| uint32_t pickle_size;
|
|
|