Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index ae504dc3e3963e5819c4344796c3520f66ba0c97..0e525d43346e7914478183c8b95c42ed1734ff17 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -3148,7 +3148,12 @@ int DescriptorArray::GetFieldIndex(int descriptor_number) { |
HeapType* DescriptorArray::GetFieldType(int descriptor_number) { |
DCHECK(GetDetails(descriptor_number).location() == kField); |
- return HeapType::cast(GetValue(descriptor_number)); |
+ Object* value = GetValue(descriptor_number); |
+ if (value->IsWeakCell()) { |
+ if (WeakCell::cast(value)->cleared()) return HeapType::None(); |
+ value = WeakCell::cast(value)->value(); |
+ } |
+ return HeapType::cast(value); |
} |