| Index: src/handles.cc
|
| diff --git a/src/handles.cc b/src/handles.cc
|
| index 224e51e1e6e1856b94d35a47ccf9938a4e0498f1..353a4346d3e962b5ae71b6fdff82f0d7d9169a67 100644
|
| --- a/src/handles.cc
|
| +++ b/src/handles.cc
|
| @@ -701,7 +701,6 @@ Handle<JSArray> GetKeysFor(Handle<JSReceiver> object, bool* threw) {
|
|
|
| Handle<FixedArray> GetEnumPropertyKeys(Handle<JSObject> object,
|
| bool cache_result) {
|
| - int index = 0;
|
| Isolate* isolate = object->GetIsolate();
|
| if (object->HasFastProperties()) {
|
| if (object->map()->instance_descriptors()->HasEnumCache()) {
|
| @@ -715,44 +714,34 @@ Handle<FixedArray> GetEnumPropertyKeys(Handle<JSObject> object,
|
| int num_enum = object->NumberOfLocalProperties(DONT_ENUM);
|
|
|
| Handle<FixedArray> storage = isolate->factory()->NewFixedArray(num_enum);
|
| - Handle<FixedArray> sort_array = isolate->factory()->NewFixedArray(num_enum);
|
| -
|
| Handle<FixedArray> indices;
|
| - Handle<FixedArray> sort_array2;
|
|
|
| if (cache_result) {
|
| indices = isolate->factory()->NewFixedArray(num_enum);
|
| - sort_array2 = isolate->factory()->NewFixedArray(num_enum);
|
| }
|
|
|
| Handle<DescriptorArray> descs =
|
| Handle<DescriptorArray>(object->map()->instance_descriptors(), isolate);
|
|
|
| + int index = 0;
|
| for (int i = 0; i < descs->number_of_descriptors(); i++) {
|
| if (!descs->GetDetails(i).IsDontEnum()) {
|
| storage->set(index, descs->GetKey(i));
|
| PropertyDetails details = descs->GetDetails(i);
|
| - sort_array->set(index, Smi::FromInt(details.index()));
|
| if (!indices.is_null()) {
|
| if (details.type() != FIELD) {
|
| indices = Handle<FixedArray>();
|
| - sort_array2 = Handle<FixedArray>();
|
| } else {
|
| int field_index = Descriptor::IndexFromValue(descs->GetValue(i));
|
| if (field_index >= map->inobject_properties()) {
|
| field_index = -(field_index - map->inobject_properties() + 1);
|
| }
|
| indices->set(index, Smi::FromInt(field_index));
|
| - sort_array2->set(index, Smi::FromInt(details.index()));
|
| }
|
| }
|
| index++;
|
| }
|
| }
|
| - storage->SortPairs(*sort_array, sort_array->length());
|
| - if (!indices.is_null()) {
|
| - indices->SortPairs(*sort_array2, sort_array2->length());
|
| - }
|
| if (cache_result) {
|
| Handle<FixedArray> bridge_storage =
|
| isolate->factory()->NewFixedArray(
|
|
|