Chromium Code Reviews| Index: src/v8natives.js |
| diff --git a/src/v8natives.js b/src/v8natives.js |
| index 831dd14ef84b233764946a02aef650ac86a8ea04..2759819a5fca408128e241975eb53b2b9f66adf1 100644 |
| --- a/src/v8natives.js |
| +++ b/src/v8natives.js |
| @@ -308,6 +308,13 @@ function ObjectLookupSetter(name) { |
| function ObjectKeys(obj) { |
| if (!IS_SPEC_OBJECT(obj)) |
| throw MakeTypeError("obj_ctor_property_non_object", ["keys"]); |
| + if (%IsJSProxy(obj)) { |
| + var handler = %GetHandler(obj); |
| + var keys = handler.keys; |
| + if (IS_UNDEFINED(keys)) keys = DerivedKeysTrap; |
| + var names = keys.call(handler); |
|
Mads Ager (chromium)
2011/07/12 13:28:19
Do you want to rely on Function.prototype.call her
rossberg
2011/07/13 10:11:52
Done, here and in a few other places. (Btw, who pi
Mads Ager (chromium)
2011/07/13 10:17:25
I don't remember. I would have preferred having th
|
| + return ToStringArray(names); |
| + } |
| return %LocalKeys(obj); |
| } |