Index: src/objects.cc |
=================================================================== |
--- src/objects.cc (revision 9574) |
+++ src/objects.cc (working copy) |
@@ -1515,8 +1515,6 @@ |
String* name, |
JSFunction* function, |
PropertyAttributes attributes) { |
- ASSERT(!GetHeap()->InNewSpace(function)); |
- |
// Allocate new instance descriptors with (name, function) added |
ConstantFunctionDescriptor d(name, function, attributes); |
Object* new_descriptors; |
@@ -1631,7 +1629,7 @@ |
// Ensure the descriptor array does not get too big. |
if (map_of_this->instance_descriptors()->number_of_descriptors() < |
DescriptorArray::kMaxNumberOfDescriptors) { |
- if (value->IsJSFunction() && !heap->InNewSpace(value)) { |
+ if (value->IsJSFunction()) { |
return AddConstantFunctionProperty(name, |
JSFunction::cast(value), |
attributes); |
@@ -2761,7 +2759,6 @@ |
ASSERT(target_descriptors->GetType(number) == CONSTANT_FUNCTION); |
JSFunction* function = |
JSFunction::cast(target_descriptors->GetValue(number)); |
- ASSERT(!HEAP->InNewSpace(function)); |
if (value == function) { |
set_map(target_map); |
return value; |