Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 6bb7893746d794b7654e1fb7dfd85aaf8f9fe569..1c29ea13b2b2dd8a17c5c179635f7ab8362f8c55 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -775,7 +775,7 @@ Handle<JSFunction> Factory::NewFunctionWithPrototype(Handle<String> name, |
instance_size != JSObject::kHeaderSize) { |
Handle<Map> initial_map = NewMap(type, |
instance_size, |
- FAST_SMI_ONLY_ELEMENTS); |
+ GetInitialFastElementsKind()); |
function->set_initial_map(*initial_map); |
initial_map->set_constructor(*function); |
} |
@@ -1013,10 +1013,11 @@ void Factory::EnsureCanContainHeapObjectElements(Handle<JSArray> array) { |
void Factory::EnsureCanContainElements(Handle<JSArray> array, |
Handle<FixedArrayBase> elements, |
+ uint32_t length, |
EnsureElementsMode mode) { |
CALL_HEAP_FUNCTION_VOID( |
isolate(), |
- array->EnsureCanContainElements(*elements, mode)); |
+ array->EnsureCanContainElements(*elements, length, mode)); |
} |