Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 6346e5b59600dd24b5e3da5d262db462cc0774c0..c9692602b76ff5584864308837b3d23e38cf3109 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -668,7 +668,11 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateArrayLiteralShallow) { |
isolate->heap()->fixed_cow_array_map()) { |
isolate->counters()->cow_arrays_created_runtime()->Increment(); |
} |
- return isolate->heap()->CopyJSObject(JSObject::cast(*boilerplate)); |
+ |
+ JSObject* boilerplate_object = JSObject::cast(*boilerplate); |
+ AllocationSiteMode mode = AllocationSiteInfo::GetMode( |
+ boilerplate_object->GetElementsKind()); |
+ return isolate->heap()->CopyJSObject(boilerplate_object, mode); |
} |