Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index e81d11626f46b9a9eab5e163c16201548b3c2c34..0f5d7c2c47d9e24ab7e781b0e6f4adc6369ff3ce 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -267,6 +267,9 @@ bool Object::HasValidElements() { |
MaybeObject* Object::AllocateNewStorageFor(Heap* heap, |
Representation representation) { |
+ if (FLAG_track_fields && representation.IsSmi() && IsUninitialized()) { |
+ return Smi::FromInt(0); |
+ } |
if (!FLAG_track_double_fields) return this; |
if (!representation.IsDouble()) return this; |
if (IsUninitialized()) { |