Commit 95ca3e8b authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Make GCTracer::ResetForTesting thread safe.

Bug: 
Change-Id: I49a259b8911969aace193cc3d0b18e4b8bcac7b8
Reviewed-on: https://chromium-review.googlesource.com/818344Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49988}
parent a837ef8a
......@@ -172,6 +172,7 @@ void GCTracer::ResetForTesting() {
recorded_context_disposal_times_.Reset();
recorded_survival_ratios_.Reset();
start_counter_ = 0;
base::LockGuard<base::Mutex> guard(&background_counter_mutex_);
for (int i = 0; i < BackgroundScope::NUMBER_OF_SCOPES; i++) {
background_counter_[i].total_duration_ms = 0;
background_counter_[i].runtime_call_counter.Reset();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment