Commit 249fbbad authored by Marja Hölttä's avatar Marja Hölttä Committed by Commit Bot

[runtimecallstats] Fix data race in WorkerThreadRuntimeCallStats

Change-Id: I8fff5e5b3d61f1054efdb4fc7f8fa2b50180e418
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2523195Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71011}
parent 27b20528
......@@ -609,6 +609,7 @@ WorkerThreadRuntimeCallStats::~WorkerThreadRuntimeCallStats() {
}
base::Thread::LocalStorageKey WorkerThreadRuntimeCallStats::GetKey() {
base::MutexGuard lock(&mutex_);
DCHECK(TracingFlags::is_runtime_stats_enabled());
if (!tls_key_) tls_key_ = base::Thread::CreateThreadLocalKey();
return *tls_key_;
......
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