Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index e6fc951513ce89e4fc91cfbfa1c400309c67a52b..c522035e39f9a4caaa4379b9e2602bf4fd750028 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -5710,7 +5710,7 @@ void JSObject::MigrateSlowToFast(Handle<JSObject> object, |
// Allocate the instance descriptor. |
Handle<DescriptorArray> descriptors = DescriptorArray::Allocate( |
- isolate, instance_descriptor_length); |
+ isolate, instance_descriptor_length, 0, TENURED); |
int number_of_allocated_fields = |
number_of_fields + unused_property_fields - inobject_props; |
@@ -10914,17 +10914,18 @@ Handle<ArrayList> ArrayList::EnsureSpace(Handle<ArrayList> array, int length) { |
return array; |
} |
- |
Handle<DescriptorArray> DescriptorArray::Allocate(Isolate* isolate, |
int number_of_descriptors, |
- int slack) { |
+ int slack, |
+ PretenureFlag pretenure) { |
DCHECK(0 <= number_of_descriptors); |
Factory* factory = isolate->factory(); |
// Do not use DescriptorArray::cast on incomplete object. |
int size = number_of_descriptors + slack; |
if (size == 0) return factory->empty_descriptor_array(); |
// Allocate the array of keys. |
- Handle<FixedArray> result = factory->NewFixedArray(LengthFor(size)); |
+ Handle<FixedArray> result = |
+ factory->NewFixedArray(LengthFor(size), pretenure); |
result->set(kDescriptorLengthIndex, Smi::FromInt(number_of_descriptors)); |
result->set(kEnumCacheIndex, Smi::FromInt(0)); |