Chromium Code Reviews| Index: src/objects.cc |
| =================================================================== |
| --- src/objects.cc (revision 1445) |
| +++ src/objects.cc (working copy) |
| @@ -456,8 +456,10 @@ |
| JSGlobalPropertyCell::cast(property_dictionary()->ValueAt(entry)); |
| cell->set_value(value); |
| store_value = cell; |
|
Kasper Lund
2009/03/09 09:27:33
Remove. You're not going to use store_value from h
|
| + // No need to update the property dictionary. |
| + } else { |
| + property_dictionary()->SetStringEntry(entry, name, store_value, details); |
|
Kasper Lund
2009/03/09 09:27:33
store_value -> value?
|
| } |
| - property_dictionary()->SetStringEntry(entry, name, store_value, details); |
| return value; |
| } |
| @@ -1322,11 +1324,14 @@ |
| Object* value, |
| PropertyAttributes attributes) { |
| PropertyDetails details = PropertyDetails(attributes, NORMAL); |
| + Object* store_value = value; |
| if (IsJSGlobalObject()) { |
| - value = Heap::AllocateJSGlobalPropertyCell(value); |
| - if (value->IsFailure()) return value; |
| + store_value = Heap::AllocateJSGlobalPropertyCell(value); |
| + if (store_value->IsFailure()) return store_value; |
| } |
| - Object* result = property_dictionary()->AddStringEntry(name, value, details); |
| + Object* result = property_dictionary()->AddStringEntry(name, |
| + store_value, |
| + details); |
| if (result->IsFailure()) return result; |
| if (property_dictionary() != result) { |
| set_properties(Dictionary::cast(result)); |
|
Kasper Lund
2009/03/09 09:27:33
Weird indentation.
|