From b3f0cc098e868a3010f13e475d65a48eb5bb7a28 Mon Sep 17 00:00:00 2001 From: Leszek Swirski Date: Tue, 8 May 2018 14:49:07 +0100 Subject: [PATCH] [weakref] Fix another MaybeObject conversion in ObjectStats Change-Id: I2afefab5bf43abee5e5dc66224cea1c68fb85179 Reviewed-on: https://chromium-review.googlesource.com/1049973 Reviewed-by: Michael Lippautz Commit-Queue: Leszek Swirski Cr-Commit-Position: refs/heads/master@{#53075} --- src/heap/object-stats.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/heap/object-stats.cc b/src/heap/object-stats.cc index 1baa39183a..ecccd038ef 100644 --- a/src/heap/object-stats.cc +++ b/src/heap/object-stats.cc @@ -479,10 +479,9 @@ void ObjectStatsCollectorImpl::RecordVirtualFeedbackVectorDetails( // Log the monomorphic/polymorphic helper objects that this slot owns. for (int i = 0; i < it.entry_size(); i++) { - Object* raw_object = - vector->get(slot.ToInt() + i)->GetHeapObjectOrSmi(); - if (!raw_object->IsHeapObject()) continue; - HeapObject* object = HeapObject::cast(raw_object); + MaybeObject* raw_object = vector->get(slot.ToInt() + i); + if (!raw_object->IsStrongOrWeakHeapObject()) continue; + HeapObject* object = raw_object->GetHeapObject(); if (object->IsCell() || object->IsWeakFixedArray()) { RecordSimpleVirtualObjectStats( vector, object, ObjectStats::FEEDBACK_VECTOR_ENTRY_TYPE);