Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 9ddaa81af44ba1df971ae679a90d5c3a50d60f89..a5c21340759327e100da1da9528bb306aa5c7b67 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -1505,6 +1505,8 @@ HeapObjectContents HeapObject::ContentType() { |
} else if (type >= FIRST_FIXED_TYPED_ARRAY_TYPE && |
type <= LAST_FIXED_TYPED_ARRAY_TYPE) { |
return HeapObjectContents::kMixedValues; |
+ } else if (type == JS_ARRAY_BUFFER_TYPE) { |
+ return HeapObjectContents::kMixedValues; |
} else if (type <= LAST_DATA_TYPE) { |
// TODO(jochen): Why do we claim that Code and Map contain only raw values? |
return HeapObjectContents::kRawValues; |
@@ -6586,6 +6588,32 @@ void JSArrayBuffer::set_is_shared(bool value) { |
} |
+// static |
+template <typename StaticVisitor> |
+void JSArrayBuffer::JSArrayBufferIterateBody(Heap* heap, HeapObject* obj) { |
+ StaticVisitor::VisitPointers( |
+ heap, obj, |
+ HeapObject::RawField(obj, JSArrayBuffer::BodyDescriptor::kStartOffset), |
+ HeapObject::RawField(obj, |
+ JSArrayBuffer::kByteLengthOffset + kPointerSize)); |
+ StaticVisitor::VisitPointers( |
+ heap, obj, HeapObject::RawField(obj, JSArrayBuffer::kSize), |
+ HeapObject::RawField(obj, JSArrayBuffer::kSizeWithInternalFields)); |
+} |
+ |
+ |
+void JSArrayBuffer::JSArrayBufferIterateBody(HeapObject* obj, |
+ ObjectVisitor* v) { |
+ v->VisitPointers( |
+ HeapObject::RawField(obj, JSArrayBuffer::BodyDescriptor::kStartOffset), |
+ HeapObject::RawField(obj, |
+ JSArrayBuffer::kByteLengthOffset + kPointerSize)); |
+ v->VisitPointers( |
+ HeapObject::RawField(obj, JSArrayBuffer::kSize), |
+ HeapObject::RawField(obj, JSArrayBuffer::kSizeWithInternalFields)); |
+} |
+ |
+ |
Object* JSArrayBufferView::byte_offset() const { |
if (WasNeutered()) return Smi::FromInt(0); |
return Object::cast(READ_FIELD(this, kByteOffsetOffset)); |