Index: src/heap/objects-visiting-inl.h |
diff --git a/src/heap/objects-visiting-inl.h b/src/heap/objects-visiting-inl.h |
index 6afee2602b28b7bde9cbd93dd71be5f248ae06a2..62be04ff349afcc97ba7fbbea4282d59703bb002 100644 |
--- a/src/heap/objects-visiting-inl.h |
+++ b/src/heap/objects-visiting-inl.h |
@@ -84,6 +84,10 @@ int StaticNewSpaceVisitor<StaticVisitor>::VisitJSArrayBuffer( |
heap, |
HeapObject::RawField(object, JSArrayBuffer::BodyDescriptor::kStartOffset), |
HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields)); |
+ if (!JSArrayBuffer::cast(object)->is_external()) { |
+ heap->RegisterLiveArrayBuffer(true, |
+ JSArrayBuffer::cast(object)->backing_store()); |
+ } |
return JSArrayBuffer::kSizeWithInternalFields; |
} |
@@ -532,7 +536,8 @@ void StaticMarkingVisitor<StaticVisitor>::VisitJSArrayBuffer( |
HeapObject::RawField(object, JSArrayBuffer::BodyDescriptor::kStartOffset), |
HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields)); |
if (!JSArrayBuffer::cast(object)->is_external()) { |
- heap->RegisterLiveArrayBuffer(JSArrayBuffer::cast(object)->backing_store()); |
+ heap->RegisterLiveArrayBuffer(heap->InNewSpace(object), |
+ JSArrayBuffer::cast(object)->backing_store()); |
} |
} |