Index: src/heap/objects-visiting-inl.h |
diff --git a/src/heap/objects-visiting-inl.h b/src/heap/objects-visiting-inl.h |
index 39803b1a2c98db9db392a6a0f360e3ba250c2dd0..6afee2602b28b7bde9cbd93dd71be5f248ae06a2 100644 |
--- a/src/heap/objects-visiting-inl.h |
+++ b/src/heap/objects-visiting-inl.h |
@@ -80,12 +80,9 @@ int StaticNewSpaceVisitor<StaticVisitor>::VisitJSArrayBuffer( |
Map* map, HeapObject* object) { |
Heap* heap = map->GetHeap(); |
- VisitPointers(heap, HeapObject::RawField( |
- object, JSArrayBuffer::BodyDescriptor::kStartOffset), |
- HeapObject::RawField(object, JSArrayBuffer::kWeakNextOffset)); |
VisitPointers( |
- heap, HeapObject::RawField(object, |
- JSArrayBuffer::kWeakNextOffset + kPointerSize), |
+ heap, |
+ HeapObject::RawField(object, JSArrayBuffer::BodyDescriptor::kStartOffset), |
HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields)); |
return JSArrayBuffer::kSizeWithInternalFields; |
} |
@@ -533,11 +530,10 @@ void StaticMarkingVisitor<StaticVisitor>::VisitJSArrayBuffer( |
StaticVisitor::VisitPointers( |
heap, |
HeapObject::RawField(object, JSArrayBuffer::BodyDescriptor::kStartOffset), |
- HeapObject::RawField(object, JSArrayBuffer::kWeakNextOffset)); |
- StaticVisitor::VisitPointers( |
- heap, HeapObject::RawField(object, |
- JSArrayBuffer::kWeakNextOffset + kPointerSize), |
HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields)); |
+ if (!JSArrayBuffer::cast(object)->is_external()) { |
+ heap->RegisterLiveArrayBuffer(JSArrayBuffer::cast(object)->backing_store()); |
+ } |
} |