Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: src/mirror-debugger.js

Issue 108083005: ES6: Add Object.getOwnPropertySymbols (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Do the filtering in the runtime function Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 the local property names.
641 propertyNames = %GetLocalPropertyNames(this.value_, true); 641 propertyNames =
642 %GetLocalPropertyNames(this.value_,
643 PROPERTY_KEY_STRING | PROPERTY_KEY_SYMBOL);
642 total += propertyNames.length; 644 total += propertyNames.length;
643 645
644 // Get names for named interceptor properties if any. 646 // Get names for named interceptor properties if any.
645 if (this.hasNamedInterceptor() && (kind & PropertyKind.Named)) { 647 if (this.hasNamedInterceptor() && (kind & PropertyKind.Named)) {
646 var namedInterceptorNames = 648 var namedInterceptorNames =
647 %GetNamedInterceptorPropertyNames(this.value_); 649 %GetNamedInterceptorPropertyNames(this.value_,
650 PROPERTY_KEY_STRING | PROPERTY_KEY_SYMBOL);
648 if (namedInterceptorNames) { 651 if (namedInterceptorNames) {
649 propertyNames = propertyNames.concat(namedInterceptorNames); 652 propertyNames = propertyNames.concat(namedInterceptorNames);
650 total += namedInterceptorNames.length; 653 total += namedInterceptorNames.length;
651 } 654 }
652 } 655 }
653 } 656 }
654 657
655 // Find all the indexed properties. 658 // Find all the indexed properties.
656 if (kind & PropertyKind.Indexed) { 659 if (kind & PropertyKind.Indexed) {
657 // Get the local element names. 660 // Get the local element names.
(...skipping 1986 matching lines...) Expand 10 before | Expand all | Expand 10 after
2644 } 2647 }
2645 if (!NUMBER_IS_FINITE(value)) { 2648 if (!NUMBER_IS_FINITE(value)) {
2646 if (value > 0) { 2649 if (value > 0) {
2647 return 'Infinity'; 2650 return 'Infinity';
2648 } else { 2651 } else {
2649 return '-Infinity'; 2652 return '-Infinity';
2650 } 2653 }
2651 } 2654 }
2652 return value; 2655 return value;
2653 } 2656 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698