Index: src/elements.cc |
diff --git a/src/elements.cc b/src/elements.cc |
index a0f176aca79f00125eefdf67fae28f034d16d309..c8436b5cd684c84b01be76507a7a1bebc79fa1bf 100644 |
--- a/src/elements.cc |
+++ b/src/elements.cc |
@@ -1011,10 +1011,13 @@ |
&array_length) && |
array_length <= Smi::kMaxValue)) { |
// Since we use std::sort above, the GC will no longer know where the |
- // HeapNumbers are. For Arrays with valid Smi length, we are sure to |
- // have no HeapNumber indices and thus we can skip this step. |
- FIXED_ARRAY_ELEMENTS_WRITE_BARRIER(isolate->heap(), *combined_keys, 0, |
- nof_indices); |
+ // HeapNumbers are, hence we have to write them again. |
+ // For Arrays with valid Smi length, we are sure to have no HeapNumber |
+ // indices and thus we can skip this step. |
+ for (uint32_t i = 0; i < nof_indices; i++) { |
+ Object* index = combined_keys->get(i); |
+ combined_keys->set(i, index); |
+ } |
} |
} |