Index: src/runtime.cc |
=================================================================== |
--- src/runtime.cc (revision 3255) |
+++ src/runtime.cc (working copy) |
@@ -6004,14 +6004,33 @@ |
// Get the property names. |
jsproto = obj; |
+ int proto_with_hidden_properties = 0; |
for (int i = 0; i < length; i++) { |
jsproto->GetLocalPropertyNames(*names, |
i == 0 ? 0 : local_property_count[i - 1]); |
+ if (!GetHiddenProperties(jsproto, false)->IsUndefined()) { |
+ proto_with_hidden_properties++; |
+ } |
if (i < length - 1) { |
jsproto = Handle<JSObject>(JSObject::cast(jsproto->GetPrototype())); |
} |
} |
+ // Filter out name of hidden propeties object. |
+ if (proto_with_hidden_properties > 0) { |
+ Handle<FixedArray> old_names = names; |
+ names = Factory::NewFixedArray( |
+ names->length() - proto_with_hidden_properties); |
+ int dest_pos = 0; |
+ for (int i = 0; i < total_property_count; i++) { |
+ Object* e = old_names->get(i); |
Mads Ager (chromium)
2009/11/10 16:04:08
Rename 'e' to 'name'?
yurys
2009/11/10 16:09:07
Done.
|
+ if (e == Heap::hidden_symbol()) { |
+ continue; |
+ } |
+ names->set(dest_pos++, e); |
+ } |
+ } |
+ |
DeleteArray(local_property_count); |
return *Factory::NewJSArrayWithElements(names); |
} |