Commit 5b7e1a01 authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Annotate accesses to used instance size field of a map as atomic.

This fixes false positive data race reported by TSAN.

Bug: chromium:790004
Change-Id: I6335af1735fe9ea77a26cc9919ec4f089b004cdf
Reviewed-on: https://chromium-review.googlesource.com/800936Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49766}
parent 9fbbe2a4
......@@ -3149,14 +3149,14 @@ int Map::UnusedPropertyFields() const {
}
int Map::used_or_unused_instance_size_in_words() const {
return READ_BYTE_FIELD(this, kUsedOrUnusedInstanceSizeInWordsOffset);
return RELAXED_READ_BYTE_FIELD(this, kUsedOrUnusedInstanceSizeInWordsOffset);
}
void Map::set_used_or_unused_instance_size_in_words(int value) {
DCHECK_LE(0, value);
DCHECK_LE(value, 255);
WRITE_BYTE_FIELD(this, kUsedOrUnusedInstanceSizeInWordsOffset,
static_cast<byte>(value));
RELAXED_WRITE_BYTE_FIELD(this, kUsedOrUnusedInstanceSizeInWordsOffset,
static_cast<byte>(value));
}
int Map::UsedInstanceSize() const {
......
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