When reading the map from a live object, use a barrier load
It could happen that we shrink a live object on the main thread (e.g. MigrateFastToSlow) while we're sweeping the same page. The main thread first creates a filler object that the release-stores the new map. Therefore it's important to barrier load the map word of live objects from the sweeper thread. BUG=none R=ulan@chromium.org,hpayer@chromium.org LOG=n Review URL: https://codereview.chromium.org/797623002 Cr-Commit-Position: refs/heads/master@{#25780}
This commit is contained in:
parent
d0cad384b2
commit
b7caca9f9a
@ -3243,7 +3243,7 @@ static int Sweep(PagedSpace* space, FreeList* free_list, Page* p,
|
||||
}
|
||||
HeapObject* live_object = HeapObject::FromAddress(free_end);
|
||||
DCHECK(Marking::IsBlack(Marking::MarkBitFrom(live_object)));
|
||||
Map* map = live_object->map();
|
||||
Map* map = live_object->synchronized_map();
|
||||
int size = live_object->SizeFromMap(map);
|
||||
if (sweeping_mode == SWEEP_AND_VISIT_LIVE_OBJECTS) {
|
||||
live_object->IterateBody(map->instance_type(), size, v);
|
||||
|
Loading…
Reference in New Issue
Block a user