commit | 031d45a1058ecf90d45c25b550734b5bf9b608dd | [log] [tgz] |
---|---|---|
author | Jeremy Roman <[email protected]> | Wed Jun 28 18:22:47 2017 |
committer | Commit Bot <[email protected]> | Thu Jun 29 01:01:24 2017 |
tree | 10fff02d8af3895cba1a685b88040a1f6f8f0cb7 | |
parent | 952c7ce4bbb944ed2d39ec167ee428a99fcaf924 [diff] |
Implement base::AtomicRefCount as a class wrapping std::atomic_int. This is the more standard approach since C++11, and it allows this class to be encapsulated (preventing abuse by performing other operations on the data). If landed, call sites will be rewritten to call member functions directly. A warning must be suppressed in MSVC, because std::atomic forces alignment, and MSVC warns on end-padding due to alignment on a class, which occurs in base::RefCountedThreadSafe in debug builds (and the warning is not targeted at base/memory/ref_counted.*, so it's hard to suppress). Bug: 736037 Tbr: [email protected],[email protected] Change-Id: Ieb0599b4a67a4e8db06bd4d08c3126baea9207e2 Reviewed-on: https://chromium-review.googlesource.com/550378 Commit-Queue: Jeremy Roman <[email protected]> Reviewed-by: danakj <[email protected]> Reviewed-by: Bruce Dawson <[email protected]> Reviewed-by: Taiju Tsuiki <[email protected]> Cr-Commit-Position: refs/heads/master@{#483238}