Index: src/runtime/runtime-array.cc |
diff --git a/src/runtime/runtime-array.cc b/src/runtime/runtime-array.cc |
index b5655db611a5ce34161d45990718872fa7f02916..e9532ac814300fd1ef237ffbaf8b12777050bcbc 100644 |
--- a/src/runtime/runtime-array.cc |
+++ b/src/runtime/runtime-array.cc |
@@ -437,12 +437,8 @@ static void CollectElementIndices(Handle<JSObject> object, uint32_t range, |
} |
case FAST_SLOPPY_ARGUMENTS_ELEMENTS: |
case SLOW_SLOPPY_ARGUMENTS_ELEMENTS: { |
- MaybeHandle<Object> length_obj = |
- Object::GetProperty(object, isolate->factory()->length_string()); |
- double length_num = length_obj.ToHandleChecked()->Number(); |
- uint32_t length = static_cast<uint32_t>(DoubleToInt32(length_num)); |
ElementsAccessor* accessor = object->GetElementsAccessor(); |
- for (uint32_t i = 0; i < length; i++) { |
+ for (uint32_t i = 0; i < range; i++) { |
if (accessor->HasElement(object, i)) { |
indices->Add(i); |
} |