Chromium Code Reviews| Index: src/proxy.js |
| diff --git a/src/proxy.js b/src/proxy.js |
| index 01d48b485ac193a19c6cc681b4e88a1533f56945..13a4312d8894b8f900426fad7e60e778630f1aa2 100644 |
| --- a/src/proxy.js |
| +++ b/src/proxy.js |
| @@ -63,3 +63,21 @@ $Proxy.create = function(handler, proto) { |
| if (!IS_SPEC_OBJECT(proto)) proto = $Object.prototype |
| return %CreateJSProxy(handler, proto) |
| } |
| + |
| + |
| + |
| + |
| +//////////////////////////////////////////////////////////////////////////////// |
| +// Builtins |
| +//////////////////////////////////////////////////////////////////////////////// |
| + |
| +function DERIVED_GET_TRAP(receiver, name) { |
|
Mads Ager (chromium)
2011/05/18 13:11:33
Let's change the naming here: DerivedGetTrap?
rossberg
2011/05/18 13:34:57
Done.
|
| + var desc = this.getPropertyDescriptor(name) |
| + if (IS_UNDEFINED(desc)) { return desc; } |
| + if ('value' in desc) { |
| + return desc.value |
| + } else { |
| + if (IS_UNDEFINED(desc.get)) { return desc.get; } |
| + return desc.get().call(receiver) // The proposal says so... |
|
Mads Ager (chromium)
2011/05/18 13:11:33
Does the proposal even say to use Function.prototy
rossberg
2011/05/18 13:34:57
Good question. The spec gives it literally in JS c
|
| + } |
| +} |