Index: src/field-index-inl.h |
diff --git a/src/field-index-inl.h b/src/field-index-inl.h |
index b2307cd0bd5aff15837629d4d90a21b624b6f077..c151ab1072463317d5f4b56445077a01a9038a5e 100644 |
--- a/src/field-index-inl.h |
+++ b/src/field-index-inl.h |
@@ -14,9 +14,10 @@ namespace internal { |
inline FieldIndex FieldIndex::ForInObjectOffset(int offset, Map* map) { |
DCHECK((offset % kPointerSize) == 0); |
int index = offset / kPointerSize; |
- return (map == NULL || offset < map->GetInObjectPropertyOffset(0)) |
- ? FieldIndex(true, index, false, 0, 0, true) |
- : FieldIndex::ForPropertyIndex(map, index); |
+ DCHECK(map == NULL || |
+ index < (map->GetInObjectPropertyOffset(0) / kPointerSize + |
+ map->inobject_properties())); |
+ return FieldIndex(true, index, false, 0, 0, true); |
} |