diff --git a/src/objects.cc b/src/objects.cc index e772d54e59..c37a4a8b20 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -2176,11 +2176,13 @@ enum RightTrimMode { FROM_GC, FROM_MUTATOR }; static void ZapEndOfFixedArray(Address new_end, int to_trim) { // If we are doing a big trim in old space then we zap the space. Object** zap = reinterpret_cast(new_end); + zap++; // Header of filler must be at least one word so skip that. for (int i = 1; i < to_trim; i++) { *zap++ = Smi::FromInt(0); } } + template static void RightTrimFixedArray(Heap* heap, FixedArray* elms, int to_trim) { ASSERT(elms->map() != HEAP->fixed_cow_array_map());