| OLD | NEW |
| 1 // Copyright 2006-2012 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2012 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 // Handle id counters. | 5 // Handle id counters. |
| 6 var next_handle_ = 0; | 6 var next_handle_ = 0; |
| 7 var next_transient_handle_ = -1; | 7 var next_transient_handle_ = -1; |
| 8 | 8 |
| 9 // Mirror cache. | 9 // Mirror cache. |
| 10 var mirror_cache_ = []; | 10 var mirror_cache_ = []; |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 ObjectMirror.prototype.propertyNames = function(kind, limit) { | 633 ObjectMirror.prototype.propertyNames = function(kind, limit) { |
| 634 // Find kind and limit and allocate array for the result | 634 // Find kind and limit and allocate array for the result |
| 635 kind = kind || PropertyKind.Named | PropertyKind.Indexed; | 635 kind = kind || PropertyKind.Named | PropertyKind.Indexed; |
| 636 | 636 |
| 637 var propertyNames; | 637 var propertyNames; |
| 638 var elementNames; | 638 var elementNames; |
| 639 var total = 0; | 639 var total = 0; |
| 640 | 640 |
| 641 // Find all the named properties. | 641 // Find all the named properties. |
| 642 if (kind & PropertyKind.Named) { | 642 if (kind & PropertyKind.Named) { |
| 643 // Get all the local property names except for private symbols. | 643 // Get all own property names except for private symbols. |
| 644 propertyNames = | 644 propertyNames = |
| 645 %GetLocalPropertyNames(this.value_, PROPERTY_ATTRIBUTES_PRIVATE_SYMBOL); | 645 %GetOwnPropertyNames(this.value_, PROPERTY_ATTRIBUTES_PRIVATE_SYMBOL); |
| 646 total += propertyNames.length; | 646 total += propertyNames.length; |
| 647 | 647 |
| 648 // Get names for named interceptor properties if any. | 648 // Get names for named interceptor properties if any. |
| 649 if (this.hasNamedInterceptor() && (kind & PropertyKind.Named)) { | 649 if (this.hasNamedInterceptor() && (kind & PropertyKind.Named)) { |
| 650 var namedInterceptorNames = | 650 var namedInterceptorNames = |
| 651 %GetNamedInterceptorPropertyNames(this.value_); | 651 %GetNamedInterceptorPropertyNames(this.value_); |
| 652 if (namedInterceptorNames) { | 652 if (namedInterceptorNames) { |
| 653 propertyNames = propertyNames.concat(namedInterceptorNames); | 653 propertyNames = propertyNames.concat(namedInterceptorNames); |
| 654 total += namedInterceptorNames.length; | 654 total += namedInterceptorNames.length; |
| 655 } | 655 } |
| 656 } | 656 } |
| 657 } | 657 } |
| 658 | 658 |
| 659 // Find all the indexed properties. | 659 // Find all the indexed properties. |
| 660 if (kind & PropertyKind.Indexed) { | 660 if (kind & PropertyKind.Indexed) { |
| 661 // Get the local element names. | 661 // Get own element names. |
| 662 elementNames = %GetLocalElementNames(this.value_); | 662 elementNames = %GetOwnElementNames(this.value_); |
| 663 total += elementNames.length; | 663 total += elementNames.length; |
| 664 | 664 |
| 665 // Get names for indexed interceptor properties. | 665 // Get names for indexed interceptor properties. |
| 666 if (this.hasIndexedInterceptor() && (kind & PropertyKind.Indexed)) { | 666 if (this.hasIndexedInterceptor() && (kind & PropertyKind.Indexed)) { |
| 667 var indexedInterceptorNames = | 667 var indexedInterceptorNames = |
| 668 %GetIndexedInterceptorElementNames(this.value_); | 668 %GetIndexedInterceptorElementNames(this.value_); |
| 669 if (indexedInterceptorNames) { | 669 if (indexedInterceptorNames) { |
| 670 elementNames = elementNames.concat(indexedInterceptorNames); | 670 elementNames = elementNames.concat(indexedInterceptorNames); |
| 671 total += indexedInterceptorNames.length; | 671 total += indexedInterceptorNames.length; |
| 672 } | 672 } |
| (...skipping 2062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2735 } | 2735 } |
| 2736 if (!NUMBER_IS_FINITE(value)) { | 2736 if (!NUMBER_IS_FINITE(value)) { |
| 2737 if (value > 0) { | 2737 if (value > 0) { |
| 2738 return 'Infinity'; | 2738 return 'Infinity'; |
| 2739 } else { | 2739 } else { |
| 2740 return '-Infinity'; | 2740 return '-Infinity'; |
| 2741 } | 2741 } |
| 2742 } | 2742 } |
| 2743 return value; | 2743 return value; |
| 2744 } | 2744 } |
| OLD | NEW |