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 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 ObjectMirror.prototype.propertyNames = function(kind, limit) { | 630 ObjectMirror.prototype.propertyNames = function(kind, limit) { |
631 // Find kind and limit and allocate array for the result | 631 // Find kind and limit and allocate array for the result |
632 kind = kind || PropertyKind.Named | PropertyKind.Indexed; | 632 kind = kind || PropertyKind.Named | PropertyKind.Indexed; |
633 | 633 |
634 var propertyNames; | 634 var propertyNames; |
635 var elementNames; | 635 var elementNames; |
636 var total = 0; | 636 var total = 0; |
637 | 637 |
638 // Find all the named properties. | 638 // Find all the named properties. |
639 if (kind & PropertyKind.Named) { | 639 if (kind & PropertyKind.Named) { |
640 // Get the local property names. | 640 // Get all the local property names. |
641 propertyNames = %GetLocalPropertyNames(this.value_, true); | 641 propertyNames = |
| 642 %GetLocalPropertyNames(this.value_, PROPERTY_ATTRIBUTES_NONE); |
642 total += propertyNames.length; | 643 total += propertyNames.length; |
643 | 644 |
644 // Get names for named interceptor properties if any. | 645 // Get names for named interceptor properties if any. |
645 if (this.hasNamedInterceptor() && (kind & PropertyKind.Named)) { | 646 if (this.hasNamedInterceptor() && (kind & PropertyKind.Named)) { |
646 var namedInterceptorNames = | 647 var namedInterceptorNames = |
647 %GetNamedInterceptorPropertyNames(this.value_); | 648 %GetNamedInterceptorPropertyNames(this.value_); |
648 if (namedInterceptorNames) { | 649 if (namedInterceptorNames) { |
649 propertyNames = propertyNames.concat(namedInterceptorNames); | 650 propertyNames = propertyNames.concat(namedInterceptorNames); |
650 total += namedInterceptorNames.length; | 651 total += namedInterceptorNames.length; |
651 } | 652 } |
(...skipping 1992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2644 } | 2645 } |
2645 if (!NUMBER_IS_FINITE(value)) { | 2646 if (!NUMBER_IS_FINITE(value)) { |
2646 if (value > 0) { | 2647 if (value > 0) { |
2647 return 'Infinity'; | 2648 return 'Infinity'; |
2648 } else { | 2649 } else { |
2649 return '-Infinity'; | 2650 return '-Infinity'; |
2650 } | 2651 } |
2651 } | 2652 } |
2652 return value; | 2653 return value; |
2653 } | 2654 } |
OLD | NEW |