summaryrefslogtreecommitdiff
path: root/runtime/interpreter/interpreter_cache-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/interpreter/interpreter_cache-inl.h')
-rw-r--r--runtime/interpreter/interpreter_cache-inl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/interpreter/interpreter_cache-inl.h b/runtime/interpreter/interpreter_cache-inl.h
index 1dda78b0ab..269f5fa9ab 100644
--- a/runtime/interpreter/interpreter_cache-inl.h
+++ b/runtime/interpreter/interpreter_cache-inl.h
@@ -37,9 +37,9 @@ inline void InterpreterCache::Set(Thread* self, const void* key, size_t value) {
DCHECK(self->GetInterpreterCache() == this) << "Must be called from owning thread";
// For simplicity, only update the cache if weak ref accesses are enabled. If
- // they are disabled, this means the GC is processing the cache, and is
+ // they are disabled, this means the CC GC could be processing the cache, and
// reading it concurrently.
- if (gUseReadBarrier && self->GetWeakRefAccessEnabled()) {
+ if (!gUseReadBarrier || self->GetWeakRefAccessEnabled()) {
data_[IndexOf(key)] = Entry{key, value};
}
}