Index: src/heap/objects-visiting-inl.h |
diff --git a/src/heap/objects-visiting-inl.h b/src/heap/objects-visiting-inl.h |
index 7efd5e0a439b5f3516d348519160f8adc3ef5ce5..6d26ad00b0b9805c4e7881d3800df2e2193c5423 100644 |
--- a/src/heap/objects-visiting-inl.h |
+++ b/src/heap/objects-visiting-inl.h |
@@ -77,7 +77,10 @@ void StaticNewSpaceVisitor<StaticVisitor>::Initialize() { |
&FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, |
int>::Visit); |
- table_.Register(kVisitJSArrayBuffer, &VisitJSArrayBuffer); |
+ table_.Register( |
+ kVisitJSArrayBuffer, |
+ &FlexibleBodyVisitor<StaticVisitor, JSArrayBuffer::BodyDescriptor, |
+ int>::Visit); |
table_.Register(kVisitFreeSpace, &VisitFreeSpace); |
@@ -99,21 +102,6 @@ void StaticNewSpaceVisitor<StaticVisitor>::Initialize() { |
kVisitStructGeneric>(); |
} |
- |
-template <typename StaticVisitor> |
-int StaticNewSpaceVisitor<StaticVisitor>::VisitJSArrayBuffer( |
- Map* map, HeapObject* object) { |
- typedef FlexibleBodyVisitor<StaticVisitor, JSArrayBuffer::BodyDescriptor, int> |
- JSArrayBufferBodyVisitor; |
- |
- if (!JSArrayBuffer::cast(object)->is_external()) { |
- Heap* heap = map->GetHeap(); |
- heap->array_buffer_tracker()->MarkLive(JSArrayBuffer::cast(object)); |
- } |
- return JSArrayBufferBodyVisitor::Visit(map, object); |
-} |
- |
- |
template <typename StaticVisitor> |
int StaticNewSpaceVisitor<StaticVisitor>::VisitBytecodeArray( |
Map* map, HeapObject* object) { |
@@ -185,7 +173,10 @@ void StaticMarkingVisitor<StaticVisitor>::Initialize() { |
table_.Register(kVisitJSFunction, &VisitJSFunction); |
- table_.Register(kVisitJSArrayBuffer, &VisitJSArrayBuffer); |
+ table_.Register( |
+ kVisitJSArrayBuffer, |
+ &FlexibleBodyVisitor<StaticVisitor, JSArrayBuffer::BodyDescriptor, |
+ void>::Visit); |
// Registration for kVisitJSRegExp is done by StaticVisitor. |
@@ -520,24 +511,6 @@ void StaticMarkingVisitor<StaticVisitor>::VisitJSRegExp(Map* map, |
JSObjectVisitor::Visit(map, object); |
} |
- |
-template <typename StaticVisitor> |
-void StaticMarkingVisitor<StaticVisitor>::VisitJSArrayBuffer( |
- Map* map, HeapObject* object) { |
- Heap* heap = map->GetHeap(); |
- |
- typedef FlexibleBodyVisitor<StaticVisitor, JSArrayBuffer::BodyDescriptor, |
- void> JSArrayBufferBodyVisitor; |
- |
- JSArrayBufferBodyVisitor::Visit(map, object); |
- |
- if (!JSArrayBuffer::cast(object)->is_external() && |
- !heap->InNewSpace(object)) { |
- heap->array_buffer_tracker()->MarkLive(JSArrayBuffer::cast(object)); |
- } |
-} |
- |
- |
template <typename StaticVisitor> |
void StaticMarkingVisitor<StaticVisitor>::VisitBytecodeArray( |
Map* map, HeapObject* object) { |