Commit f70e2ff2 authored by Omer Katz's avatar Omer Katz Committed by Commit Bot

heap: Fix race in ephemeron tracing.

Ephemeron tracing used to be only on mutator thread. We recently
restructured it in a way that allows for concurrenncy. This, the
TraceEphemeron method can be concurrent and should use GetSafe.

Bug: 986235
Change-Id: Ib10ad7eef383f41d2a70d966d04904a54bc96e76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2358970
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: default avatarAnton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799175}
parent a1199b6a
......@@ -200,7 +200,7 @@ class PLATFORM_EXPORT Visitor {
void TraceEphemeron(const WeakMember<T>& key,
const void* value,
TraceCallback value_trace_callback) {
T* t = key.Get();
const T* t = key.GetSafe();
if (!t)
return;
VisitEphemeron(TraceDescriptorFor(t).base_object_payload, value,
......
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