| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 var $proxyDelegateCallAndConstruct; | 5 var $proxyDelegateCallAndConstruct; |
| 6 var $proxyDerivedGetTrap; | 6 var $proxyDerivedGetTrap; |
| 7 var $proxyDerivedHasTrap; | 7 var $proxyDerivedHasTrap; |
| 8 var $proxyDerivedHasOwnTrap; | 8 var $proxyDerivedHasOwnTrap; |
| 9 var $proxyDerivedKeysTrap; | 9 var $proxyDerivedKeysTrap; |
| 10 var $proxyDerivedSetTrap; | 10 var $proxyDerivedSetTrap; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 } | 169 } |
| 170 } | 170 } |
| 171 return enumerableNames | 171 return enumerableNames |
| 172 } | 172 } |
| 173 | 173 |
| 174 function ProxyEnumerate(proxy) { | 174 function ProxyEnumerate(proxy) { |
| 175 var handler = %GetHandler(proxy) | 175 var handler = %GetHandler(proxy) |
| 176 if (IS_UNDEFINED(handler.enumerate)) { | 176 if (IS_UNDEFINED(handler.enumerate)) { |
| 177 return %Apply(DerivedEnumerateTrap, handler, [], 0, 0) | 177 return %Apply(DerivedEnumerateTrap, handler, [], 0, 0) |
| 178 } else { | 178 } else { |
| 179 return $toNameArray(handler.enumerate(), "enumerate", false) | 179 return ToNameArray(handler.enumerate(), "enumerate", false) |
| 180 } | 180 } |
| 181 } | 181 } |
| 182 | 182 |
| 183 //------------------------------------------------------------------- | 183 //------------------------------------------------------------------- |
| 184 | 184 |
| 185 var Proxy = new GlobalObject(); | 185 var Proxy = new GlobalObject(); |
| 186 %AddNamedProperty(global, "Proxy", Proxy, DONT_ENUM); | 186 %AddNamedProperty(global, "Proxy", Proxy, DONT_ENUM); |
| 187 | 187 |
| 188 //Set up non-enumerable properties of the Proxy object. | 188 //Set up non-enumerable properties of the Proxy object. |
| 189 $installFunctions(Proxy, DONT_ENUM, [ | 189 InstallFunctions(Proxy, DONT_ENUM, [ |
| 190 "create", ProxyCreate, | 190 "create", ProxyCreate, |
| 191 "createFunction", ProxyCreateFunction | 191 "createFunction", ProxyCreateFunction |
| 192 ]) | 192 ]) |
| 193 | 193 |
| 194 $proxyDelegateCallAndConstruct = DelegateCallAndConstruct; | 194 $proxyDelegateCallAndConstruct = DelegateCallAndConstruct; |
| 195 $proxyDerivedGetTrap = DerivedGetTrap; | 195 $proxyDerivedGetTrap = DerivedGetTrap; |
| 196 $proxyDerivedHasTrap = DerivedHasTrap; | 196 $proxyDerivedHasTrap = DerivedHasTrap; |
| 197 $proxyDerivedHasOwnTrap = DerivedHasOwnTrap; | 197 $proxyDerivedHasOwnTrap = DerivedHasOwnTrap; |
| 198 $proxyDerivedKeysTrap = DerivedKeysTrap; | 198 $proxyDerivedKeysTrap = DerivedKeysTrap; |
| 199 $proxyDerivedSetTrap = DerivedSetTrap; | 199 $proxyDerivedSetTrap = DerivedSetTrap; |
| 200 $proxyEnumerate = ProxyEnumerate; | 200 $proxyEnumerate = ProxyEnumerate; |
| 201 | 201 |
| 202 })(); | 202 })(); |
| OLD | NEW |