Index: src/heap/scavenger.cc |
diff --git a/src/heap/scavenger.cc b/src/heap/scavenger.cc |
index 51968c3990b23f1916a773917b17d801052071f8..1d785d08d24232388be4d45603d68f9da313c22a 100644 |
--- a/src/heap/scavenger.cc |
+++ b/src/heap/scavenger.cc |
@@ -289,6 +289,14 @@ |
static inline void EvacuateJSArrayBuffer(Map* map, HeapObject** slot, |
HeapObject* object) { |
ObjectEvacuationStrategy<POINTER_OBJECT>::Visit(map, slot, object); |
+ |
+ Heap* heap = map->GetHeap(); |
+ MapWord map_word = object->map_word(); |
+ DCHECK(map_word.IsForwardingAddress()); |
+ HeapObject* target = map_word.ToForwardingAddress(); |
+ if (!heap->InNewSpace(target)) { |
+ heap->array_buffer_tracker()->Promote(JSArrayBuffer::cast(target)); |
+ } |
} |