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 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 */ | 1080 */ |
1081 ErrorMirror.prototype.message = function() { | 1081 ErrorMirror.prototype.message = function() { |
1082 return this.value_.message; | 1082 return this.value_.message; |
1083 }; | 1083 }; |
1084 | 1084 |
1085 | 1085 |
1086 ErrorMirror.prototype.toText = function() { | 1086 ErrorMirror.prototype.toText = function() { |
1087 // Use the same text representation as in messages.js. | 1087 // Use the same text representation as in messages.js. |
1088 var text; | 1088 var text; |
1089 try { | 1089 try { |
1090 str = %_CallFunction(this.value_, builtins.errorToString); | 1090 str = %_CallFunction(this.value_, builtins.ErrorToString); |
1091 } catch (e) { | 1091 } catch (e) { |
1092 str = '#<Error>'; | 1092 str = '#<Error>'; |
1093 } | 1093 } |
1094 return str; | 1094 return str; |
1095 } | 1095 } |
1096 | 1096 |
1097 | 1097 |
1098 /** | 1098 /** |
1099 * Base mirror object for properties. | 1099 * Base mirror object for properties. |
1100 * @param {ObjectMirror} mirror The mirror object having this property | 1100 * @param {ObjectMirror} mirror The mirror object having this property |
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2420 } | 2420 } |
2421 if (!NUMBER_IS_FINITE(value)) { | 2421 if (!NUMBER_IS_FINITE(value)) { |
2422 if (value > 0) { | 2422 if (value > 0) { |
2423 return 'Infinity'; | 2423 return 'Infinity'; |
2424 } else { | 2424 } else { |
2425 return '-Infinity'; | 2425 return '-Infinity'; |
2426 } | 2426 } |
2427 } | 2427 } |
2428 return value; | 2428 return value; |
2429 } | 2429 } |
OLD | NEW |