Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index a97590ae69dccd09c35868ce7c3c6a1a632a7603..8a23988de09e93fcaa5eafe0ac9a0e3e99341e04 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -11896,8 +11896,9 @@ MaybeObject* JSObject::PrepareSlowElementsForSort(uint32_t limit) { |
ASSERT(!k->IsHeapNumber() || HeapNumber::cast(k)->value() <= kMaxUInt32); |
Object* value = dict->ValueAt(i); |
PropertyDetails details = dict->DetailsAt(i); |
- if (details.type() == CALLBACKS) { |
+ if (details.type() == CALLBACKS || details.IsReadOnly()) { |
// Bail out and do the sorting of undefineds and array holes in JS. |
+ // Also bail out if the element is not supposed to be moved. |
return Smi::FromInt(-1); |
} |
uint32_t key = NumberToUint32(k); |