Chromium Code Reviews| Index: src/heap.cc |
| diff --git a/src/heap.cc b/src/heap.cc |
| index 81339fc04c38d319eeb8640aea2061a34416a24e..945e5233416fe228068361a31fa6f5417a5205b5 100644 |
| --- a/src/heap.cc |
| +++ b/src/heap.cc |
| @@ -3709,11 +3709,10 @@ MaybeObject* Heap::AllocateFunctionPrototype(JSFunction* function) { |
| // constructors. |
| Map* new_map; |
| ASSERT(object_function->has_initial_map()); |
| - { MaybeObject* maybe_map = |
| - object_function->initial_map()->CopyDropTransitions( |
| - DescriptorArray::MAY_BE_SHARED); |
| - if (!maybe_map->To<Map>(&new_map)) return maybe_map; |
| - } |
| + MaybeObject* maybe_map = |
| + object_function->initial_map()->Copy(DescriptorArray::MAY_BE_SHARED); |
| + if (!maybe_map->To(&new_map)) return maybe_map; |
| + |
| Object* prototype; |
| { MaybeObject* maybe_prototype = AllocateJSObjectFromMap(new_map); |
|
Jakob Kummerow
2012/07/17 13:43:10
nit: for consistency, remove this {} too, please.
|
| if (!maybe_prototype->ToObject(&prototype)) return maybe_prototype; |
| @@ -3721,11 +3720,11 @@ MaybeObject* Heap::AllocateFunctionPrototype(JSFunction* function) { |
| // When creating the prototype for the function we must set its |
| // constructor to the function. |
| Object* result; |
| - { MaybeObject* maybe_result = |
| - JSObject::cast(prototype)->SetLocalPropertyIgnoreAttributes( |
| - constructor_symbol(), function, DONT_ENUM); |
| - if (!maybe_result->ToObject(&result)) return maybe_result; |
| - } |
| + MaybeObject* maybe_result = |
| + JSObject::cast(prototype)->SetLocalPropertyIgnoreAttributes( |
| + constructor_symbol(), function, DONT_ENUM); |
| + if (!maybe_result->To(&result)) return maybe_result; |
|
Jakob Kummerow
2012/07/17 13:43:10
Unless I'm missing something, this should rather b
|
| + |
| return prototype; |
| } |