| Index: src/heap.cc
|
| ===================================================================
|
| --- src/heap.cc (revision 3866)
|
| +++ src/heap.cc (working copy)
|
| @@ -2383,11 +2383,14 @@
|
| map->set_unused_property_fields(in_object_properties);
|
| map->set_prototype(prototype);
|
|
|
| - // If the function has only simple this property assignments add field
|
| - // descriptors for these to the initial map as the object cannot be
|
| - // constructed without having these properties.
|
| + // If the function has only simple this property assignments add
|
| + // field descriptors for these to the initial map as the object
|
| + // cannot be constructed without having these properties. Guard by
|
| + // the inline_new flag so we only change the map if we generate a
|
| + // specialized construct stub.
|
| ASSERT(in_object_properties <= Map::kMaxPreAllocatedPropertyFields);
|
| - if (fun->shared()->has_only_simple_this_property_assignments() &&
|
| + if (FLAG_inline_new &&
|
| + fun->shared()->has_only_simple_this_property_assignments() &&
|
| fun->shared()->this_property_assignments_count() > 0) {
|
| int count = fun->shared()->this_property_assignments_count();
|
| if (count > in_object_properties) {
|
|
|