Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 4ea0a0819b7fae40a51ae1265bdfd210461531ac..dc739358bce6a2b9c19807d5f0678759c1b30cc4 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -3136,7 +3136,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::Any(); |
+ value = WeakCell::cast(value)->value(); |
+ } |
+ return HeapType::cast(value); |
} |