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

Unified Diff: base/debug/activity_analyzer_unittest.cc

Issue 2422683002: Hold allocator lock while fetching 'used' count. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | base/debug/activity_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/activity_analyzer_unittest.cc
diff --git a/base/debug/activity_analyzer_unittest.cc b/base/debug/activity_analyzer_unittest.cc
index 953a52f02d5cafce56fe68828f1babafa1dd501d..7333656b72f5f0c5da0ec30538b968ea5dcd7d00 100644
--- a/base/debug/activity_analyzer_unittest.cc
+++ b/base/debug/activity_analyzer_unittest.cc
@@ -104,7 +104,7 @@ class SimpleActivityThread : public SimpleThread {
{
AutoLock auto_lock(lock_);
- ready_.store(true, std::memory_order_relaxed);
+ ready_.store(true, std::memory_order_release);
while (!exit_.load(std::memory_order_relaxed))
exit_condition_.Wait();
}
@@ -121,7 +121,7 @@ class SimpleActivityThread : public SimpleThread {
}
void WaitReady() {
- SPIN_FOR_1_SECOND_OR_UNTIL_TRUE(ready_.load(std::memory_order_relaxed));
+ SPIN_FOR_1_SECOND_OR_UNTIL_TRUE(ready_.load(std::memory_order_acquire));
}
private:
« no previous file with comments | « no previous file | base/debug/activity_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698