Index: src/heap/objects-visiting-inl.h |
diff --git a/src/heap/objects-visiting-inl.h b/src/heap/objects-visiting-inl.h |
index 7f83f483ba750e9e149da2c8ed580f5f6fe0dee0..f02746d9cfb52feb69f1db72937c98746d905acd 100644 |
--- a/src/heap/objects-visiting-inl.h |
+++ b/src/heap/objects-visiting-inl.h |
@@ -85,6 +85,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; |
} |
@@ -504,7 +508,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()); |
} |
} |