Index: test/cctest/test-heap.cc |
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc |
index a0360a75a7650387c801936f38a9e4aeb7b90503..ff9e51a621ab7f4c634d4de79722134265c8eabf 100644 |
--- a/test/cctest/test-heap.cc |
+++ b/test/cctest/test-heap.cc |
@@ -2210,10 +2210,10 @@ TEST(OptimizedPretenuringAllocationFolding) { |
"var number_elements = 20000;" |
"var elements = new Array();" |
"function f() {" |
- " for (var i = 0; i < 20000-1; i++) {" |
+ " for (var i = 0; i < number_elements; i++) {" |
" elements[i] = new DataObject();" |
" }" |
- " return new DataObject()" |
+ " return elements[number_elements-1]" |
"};" |
"f(); f(); f();" |
"%OptimizeFunctionOnNextCall(f);" |