| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index c7d3ff7f1bfbef600176c806619a1e946fa703fb..f9c5286291a2e4aa687f0c41d544774b84e6c5f1 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -305,13 +305,14 @@ static Handle<Object> CreateObjectLiteralBoilerplate(
|
| }
|
| Handle<Object> result;
|
| uint32_t element_index = 0;
|
| - if (key->ToArrayIndex(&element_index)) {
|
| - // Array index (uint32).
|
| - result = SetElement(boilerplate, element_index, value);
|
| - } else if (key->IsSymbol()) {
|
| - // The key is not an array index.
|
| + if (key->IsSymbol()) {
|
| + // If key is a symbol it is not an array element.
|
| Handle<String> name(String::cast(*key));
|
| + ASSERT(!name->AsArrayIndex(&element_index));
|
| result = SetProperty(boilerplate, name, value, NONE);
|
| + } else if (key->ToArrayIndex(&element_index)) {
|
| + // Array index (uint32).
|
| + result = SetElement(boilerplate, element_index, value);
|
| } else {
|
| // Non-uint32 number.
|
| ASSERT(key->IsNumber());
|
|
|