[heap, runtime] Make map.visitor_id accessor atomic.
This is a workaround for false positive race reported by TSAN. Bug: v8:7315 Change-Id: I55712010dc5386a58b5ef7d48043e474f4b89bb9 Reviewed-on: https://chromium-review.googlesource.com/869672 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#50654}
This commit is contained in:
parent
daed2eb723
commit
342befe018
@ -189,13 +189,14 @@ FixedArrayBase* Map::GetInitialElements() const {
|
||||
}
|
||||
|
||||
VisitorId Map::visitor_id() const {
|
||||
return static_cast<VisitorId>(READ_BYTE_FIELD(this, kVisitorIdOffset));
|
||||
return static_cast<VisitorId>(
|
||||
RELAXED_READ_BYTE_FIELD(this, kVisitorIdOffset));
|
||||
}
|
||||
|
||||
void Map::set_visitor_id(VisitorId id) {
|
||||
DCHECK_LE(0, id);
|
||||
DCHECK_LT(id, 256);
|
||||
WRITE_BYTE_FIELD(this, kVisitorIdOffset, static_cast<byte>(id));
|
||||
RELAXED_WRITE_BYTE_FIELD(this, kVisitorIdOffset, static_cast<byte>(id));
|
||||
}
|
||||
|
||||
int Map::instance_size_in_words() const {
|
||||
|
Loading…
Reference in New Issue
Block a user