Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Unified Diff: base/debug/activity_tracker.cc

Issue 2688753002: Add acquire/release to global variable. (Closed)
Patch Set: rebased Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/debug/activity_tracker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/activity_tracker.cc
diff --git a/base/debug/activity_tracker.cc b/base/debug/activity_tracker.cc
index efdf8c89ee6b3b241c532bf1a17e1e5132b0e9bc..09946eed7296a2088f152b30ab46b513ea6dcf05 100644
--- a/base/debug/activity_tracker.cc
+++ b/base/debug/activity_tracker.cc
@@ -1260,7 +1260,7 @@ GlobalActivityTracker::GlobalActivityTracker(
// Ensure that there is no other global object and then make this one such.
DCHECK(!g_tracker_);
- subtle::NoBarrier_Store(&g_tracker_, reinterpret_cast<uintptr_t>(this));
+ subtle::Release_Store(&g_tracker_, reinterpret_cast<uintptr_t>(this));
// The global records must be iterable in order to be found by an analyzer.
allocator_->MakeIterable(allocator_->GetAsReference(
@@ -1276,7 +1276,7 @@ GlobalActivityTracker::GlobalActivityTracker(
GlobalActivityTracker::~GlobalActivityTracker() {
DCHECK_EQ(Get(), this);
DCHECK_EQ(0, thread_tracker_count_.load(std::memory_order_relaxed));
- subtle::NoBarrier_Store(&g_tracker_, 0);
+ subtle::Release_Store(&g_tracker_, 0);
}
void GlobalActivityTracker::ReturnTrackerMemory(
« no previous file with comments | « base/debug/activity_tracker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698