| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 154 |
| 155 function DerivedEnumerateTrap() { | 155 function DerivedEnumerateTrap() { |
| 156 var names = this.getPropertyNames() | 156 var names = this.getPropertyNames() |
| 157 var enumerableNames = [] | 157 var enumerableNames = [] |
| 158 for (var i = 0, count = 0; i < names.length; ++i) { | 158 for (var i = 0, count = 0; i < names.length; ++i) { |
| 159 var name = names[i] | 159 var name = names[i] |
| 160 if (IS_SYMBOL(name)) continue | 160 if (IS_SYMBOL(name)) continue |
| 161 var desc = this.getPropertyDescriptor(TO_STRING_INLINE(name)) | 161 var desc = this.getPropertyDescriptor(TO_STRING_INLINE(name)) |
| 162 if (!IS_UNDEFINED(desc)) { | 162 if (!IS_UNDEFINED(desc)) { |
| 163 if (!desc.configurable) { | 163 if (!desc.configurable) { |
| 164 throw MakeTypeError("proxy_prop_not_configurable", | 164 throw MakeTypeError(kProxyPropNotConfigurable, |
| 165 [this, "getPropertyDescriptor", name]) | 165 this, name, "getPropertyDescriptor") |
| 166 } | 166 } |
| 167 if (desc.enumerable) enumerableNames[count++] = names[i] | 167 if (desc.enumerable) enumerableNames[count++] = names[i] |
| 168 } | 168 } |
| 169 } | 169 } |
| 170 return enumerableNames | 170 return enumerableNames |
| 171 } | 171 } |
| 172 | 172 |
| 173 function ProxyEnumerate(proxy) { | 173 function ProxyEnumerate(proxy) { |
| 174 var handler = %GetHandler(proxy) | 174 var handler = %GetHandler(proxy) |
| 175 if (IS_UNDEFINED(handler.enumerate)) { | 175 if (IS_UNDEFINED(handler.enumerate)) { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 192 | 192 |
| 193 $proxyDelegateCallAndConstruct = DelegateCallAndConstruct; | 193 $proxyDelegateCallAndConstruct = DelegateCallAndConstruct; |
| 194 $proxyDerivedGetTrap = DerivedGetTrap; | 194 $proxyDerivedGetTrap = DerivedGetTrap; |
| 195 $proxyDerivedHasTrap = DerivedHasTrap; | 195 $proxyDerivedHasTrap = DerivedHasTrap; |
| 196 $proxyDerivedHasOwnTrap = DerivedHasOwnTrap; | 196 $proxyDerivedHasOwnTrap = DerivedHasOwnTrap; |
| 197 $proxyDerivedKeysTrap = DerivedKeysTrap; | 197 $proxyDerivedKeysTrap = DerivedKeysTrap; |
| 198 $proxyDerivedSetTrap = DerivedSetTrap; | 198 $proxyDerivedSetTrap = DerivedSetTrap; |
| 199 $proxyEnumerate = ProxyEnumerate; | 199 $proxyEnumerate = ProxyEnumerate; |
| 200 | 200 |
| 201 })(); | 201 })(); |
| OLD | NEW |