Index: src/elements.cc |
diff --git a/src/elements.cc b/src/elements.cc |
index dd190b9966ac25cad4fe61644e2be39b26c58f55..448d56bfae48ae65e17b48006e7054a048613798 100644 |
--- a/src/elements.cc |
+++ b/src/elements.cc |
@@ -2150,7 +2150,8 @@ class FastElementsAccessor : public ElementsAccessorBase<Subclass, KindTraits> { |
int hole_end) { |
Heap* heap = isolate->heap(); |
Handle<BackingStore> dst_elms = Handle<BackingStore>::cast(backing_store); |
- if (heap->CanMoveObjectStart(*dst_elms) && dst_index == 0) { |
+ if (heap->CanMoveObjectStart(*dst_elms) && dst_index == 0 && |
+ len > JSArray::kMaxCopyElements) { |
// Update all the copies of this backing_store handle. |
*dst_elms.location() = |
BackingStore::cast(heap->LeftTrimFixedArray(*dst_elms, src_index)); |