diff options
Diffstat (limited to 'deps/v8/src/objects.cc')
-rw-r--r-- | deps/v8/src/objects.cc | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/deps/v8/src/objects.cc b/deps/v8/src/objects.cc index 52f1f9af61..0f8dca398d 100644 --- a/deps/v8/src/objects.cc +++ b/deps/v8/src/objects.cc @@ -1351,8 +1351,6 @@ Object* JSObject::AddFastProperty(String* name, Object* JSObject::AddConstantFunctionProperty(String* name, JSFunction* function, PropertyAttributes attributes) { - ASSERT(!Heap::InNewSpace(function)); - // Allocate new instance descriptors with (name, function) added ConstantFunctionDescriptor d(name, function, attributes); Object* new_descriptors = @@ -1439,7 +1437,7 @@ Object* JSObject::AddProperty(String* name, // Ensure the descriptor array does not get too big. if (map()->instance_descriptors()->number_of_descriptors() < DescriptorArray::kMaxNumberOfDescriptors) { - if (value->IsJSFunction() && !Heap::InNewSpace(value)) { + if (value->IsJSFunction()) { return AddConstantFunctionProperty(name, JSFunction::cast(value), attributes); @@ -3256,8 +3254,7 @@ Object* DescriptorArray::Allocate(int number_of_descriptors) { return Heap::empty_descriptor_array(); } // Allocate the array of keys. - Object* array = - Heap::AllocateFixedArray(ToKeyIndex(number_of_descriptors)); + Object* array = Heap::AllocateFixedArray(ToKeyIndex(number_of_descriptors)); if (array->IsFailure()) return array; // Do not use DescriptorArray::cast on incomplete object. FixedArray* result = FixedArray::cast(array); @@ -7965,10 +7962,7 @@ Object* StringDictionary::TransformPropertiesToFastFor( PropertyType type = DetailsAt(i).type(); ASSERT(type != FIELD); instance_descriptor_length++; - if (type == NORMAL && - (!value->IsJSFunction() || Heap::InNewSpace(value))) { - number_of_fields += 1; - } + if (type == NORMAL && !value->IsJSFunction()) number_of_fields += 1; } } @@ -7999,7 +7993,7 @@ Object* StringDictionary::TransformPropertiesToFastFor( PropertyDetails details = DetailsAt(i); PropertyType type = details.type(); - if (value->IsJSFunction() && !Heap::InNewSpace(value)) { + if (value->IsJSFunction()) { ConstantFunctionDescriptor d(String::cast(key), JSFunction::cast(value), details.attributes(), |