Index: src/ast.cc |
diff --git a/src/ast.cc b/src/ast.cc |
index 31cfee3cac72783cac74aab5d18f1f149ca2b187..0bd101ff6eb4300e3aa7b1812c305f39e13bcfaa 100644 |
--- a/src/ast.cc |
+++ b/src/ast.cc |
@@ -521,9 +521,9 @@ void ArrayLiteral::BuildConstantElements(Isolate* isolate) { |
if (!constant_elements_.is_null()) return; |
// Allocate a fixed array to hold all the object literals. |
- Handle<JSArray> array = |
- isolate->factory()->NewJSArray(0, FAST_HOLEY_SMI_ELEMENTS); |
- JSArray::Expand(array, values()->length()); |
+ Handle<JSArray> array = isolate->factory()->NewJSArray( |
+ FAST_HOLEY_SMI_ELEMENTS, values()->length(), values()->length(), |
+ Strength::WEAK, INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE); |
// Fill in the literals. |
bool is_simple = true; |