| Index: src/handles.cc
|
| ===================================================================
|
| --- src/handles.cc (revision 478)
|
| +++ src/handles.cc (working copy)
|
| @@ -391,13 +391,8 @@
|
|
|
| Handle<JSArray> GetKeysFor(Handle<JSObject> object) {
|
| Counters::for_in.Increment();
|
| -
|
| - Handle<FixedArray> content = GetKeysInFixedArrayFor(object);
|
| -
|
| - // Allocate the JSArray with the result.
|
| - Handle<JSArray> obj = Factory::NewJSArray(content->length());
|
| - Handle<JSArray>::cast(obj)->SetContent(*content);
|
| - return Handle<JSArray>::cast(obj);
|
| + Handle<FixedArray> elements = GetKeysInFixedArrayFor(object);
|
| + return Factory::NewJSArrayWithElements(elements);
|
| }
|
|
|
|
|
|
|