Index: src/ast.cc |
diff --git a/src/ast.cc b/src/ast.cc |
index 086d0153623dd4b33c3749f424f4dfdc46c7b56d..f6cf18915b0932395e43d76188f98426acf37f8c 100644 |
--- a/src/ast.cc |
+++ b/src/ast.cc |
@@ -357,8 +357,7 @@ void ArrayLiteral::BuildConstantElements(Isolate* isolate) { |
// Allocate a fixed array to hold all the object literals. |
Handle<JSArray> array = |
isolate->factory()->NewJSArray(0, FAST_HOLEY_SMI_ELEMENTS); |
- isolate->factory()->SetElementsCapacityAndLength( |
- array, values()->length(), values()->length()); |
+ JSArray::Expand(array, values()->length()); |
// Fill in the literals. |
bool is_simple = true; |