| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 return namedInterceptorProperties.concat(indexedInterceptorProperties); | 675 return namedInterceptorProperties.concat(indexedInterceptorProperties); |
| 676 } else if (namedInterceptorProperties) { | 676 } else if (namedInterceptorProperties) { |
| 677 return namedInterceptorProperties; | 677 return namedInterceptorProperties; |
| 678 } else { | 678 } else { |
| 679 return indexedInterceptorProperties; | 679 return indexedInterceptorProperties; |
| 680 } | 680 } |
| 681 }; | 681 }; |
| 682 | 682 |
| 683 | 683 |
| 684 ObjectMirror.prototype.property = function(name) { | 684 ObjectMirror.prototype.property = function(name) { |
| 685 var details = %DebugGetLocalPropertyDetails(this.value_, %ToString(name)); | 685 var details = %DebugGetPropertyDetails(this.value_, %ToString(name)); |
| 686 if (details) { | 686 if (details) { |
| 687 return new PropertyMirror(this, name, details[0], details[1]); | 687 return new PropertyMirror(this, name, details[0], details[1]); |
| 688 } | 688 } |
| 689 | 689 |
| 690 // Nothing found. | 690 // Nothing found. |
| 691 return new UndefinedMirror(); | 691 return new UndefinedMirror(); |
| 692 }; | 692 }; |
| 693 | 693 |
| 694 | 694 |
| 695 | 695 |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 968 return this.value_.length; | 968 return this.value_.length; |
| 969 }; | 969 }; |
| 970 | 970 |
| 971 | 971 |
| 972 ArrayMirror.prototype.indexedPropertiesFromRange = function(opt_from_index, opt_
to_index) { | 972 ArrayMirror.prototype.indexedPropertiesFromRange = function(opt_from_index, opt_
to_index) { |
| 973 var from_index = opt_from_index || 0; | 973 var from_index = opt_from_index || 0; |
| 974 var to_index = opt_to_index || this.length() - 1; | 974 var to_index = opt_to_index || this.length() - 1; |
| 975 if (from_index > to_index) return new Array(); | 975 if (from_index > to_index) return new Array(); |
| 976 var values = new Array(to_index - from_index + 1); | 976 var values = new Array(to_index - from_index + 1); |
| 977 for (var i = from_index; i <= to_index; i++) { | 977 for (var i = from_index; i <= to_index; i++) { |
| 978 var details = %DebugGetLocalPropertyDetails(this.value_, %ToString(i)); | 978 var details = %DebugGetPropertyDetails(this.value_, %ToString(i)); |
| 979 var value; | 979 var value; |
| 980 if (details) { | 980 if (details) { |
| 981 value = new PropertyMirror(this, i, details[0], details[1]); | 981 value = new PropertyMirror(this, i, details[0], details[1]); |
| 982 } else { | 982 } else { |
| 983 value = new UndefinedMirror(); | 983 value = new UndefinedMirror(); |
| 984 } | 984 } |
| 985 values[i - from_index] = value; | 985 values[i - from_index] = value; |
| 986 } | 986 } |
| 987 return values; | 987 return values; |
| 988 } | 988 } |
| (...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1915 /** | 1915 /** |
| 1916 * Convert a Date to ISO 8601 format. To avoid depending on the Date object | 1916 * Convert a Date to ISO 8601 format. To avoid depending on the Date object |
| 1917 * this method calls the functions in date.js directly and not through the | 1917 * this method calls the functions in date.js directly and not through the |
| 1918 * value. | 1918 * value. |
| 1919 * @param {Date} value The Date value to format as JSON | 1919 * @param {Date} value The Date value to format as JSON |
| 1920 * @return {string} JSON formatted Date value | 1920 * @return {string} JSON formatted Date value |
| 1921 */ | 1921 */ |
| 1922 function DateToJSON_(value) { | 1922 function DateToJSON_(value) { |
| 1923 return '"' + DateToISO8601_(value) + '"'; | 1923 return '"' + DateToISO8601_(value) + '"'; |
| 1924 } | 1924 } |
| OLD | NEW |