[weakref] Fix another MaybeObject conversion in ObjectStats

Change-Id: I2afefab5bf43abee5e5dc66224cea1c68fb85179
Reviewed-on: https://chromium-review.googlesource.com/1049973
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53075}
This commit is contained in:
Leszek Swirski 2018-05-08 14:49:07 +01:00 committed by Commit Bot
parent 4c5926d593
commit b3f0cc098e

View File

@ -479,10 +479,9 @@ void ObjectStatsCollectorImpl::RecordVirtualFeedbackVectorDetails(
// Log the monomorphic/polymorphic helper objects that this slot owns. // Log the monomorphic/polymorphic helper objects that this slot owns.
for (int i = 0; i < it.entry_size(); i++) { for (int i = 0; i < it.entry_size(); i++) {
Object* raw_object = MaybeObject* raw_object = vector->get(slot.ToInt() + i);
vector->get(slot.ToInt() + i)->GetHeapObjectOrSmi(); if (!raw_object->IsStrongOrWeakHeapObject()) continue;
if (!raw_object->IsHeapObject()) continue; HeapObject* object = raw_object->GetHeapObject();
HeapObject* object = HeapObject::cast(raw_object);
if (object->IsCell() || object->IsWeakFixedArray()) { if (object->IsCell() || object->IsWeakFixedArray()) {
RecordSimpleVirtualObjectStats( RecordSimpleVirtualObjectStats(
vector, object, ObjectStats::FEEDBACK_VECTOR_ENTRY_TYPE); vector, object, ObjectStats::FEEDBACK_VECTOR_ENTRY_TYPE);