| 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 "use strict"; | 4 "use strict"; |
| 5 | 5 |
| 6 // Handle id counters. | 6 // Handle id counters. |
| 7 var next_handle_ = 0; | 7 var next_handle_ = 0; |
| 8 var next_transient_handle_ = -1; | 8 var next_transient_handle_ = -1; |
| 9 | 9 |
| 10 // Mirror cache. | 10 // Mirror cache. |
| (...skipping 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1307 */ | 1307 */ |
| 1308 ErrorMirror.prototype.message = function() { | 1308 ErrorMirror.prototype.message = function() { |
| 1309 return this.value_.message; | 1309 return this.value_.message; |
| 1310 }; | 1310 }; |
| 1311 | 1311 |
| 1312 | 1312 |
| 1313 ErrorMirror.prototype.toText = function() { | 1313 ErrorMirror.prototype.toText = function() { |
| 1314 // Use the same text representation as in messages.js. | 1314 // Use the same text representation as in messages.js. |
| 1315 var text; | 1315 var text; |
| 1316 try { | 1316 try { |
| 1317 text = %_CallFunction(this.value_, builtins.ErrorToString); | 1317 text = %_CallFunction(this.value_, builtins.$errorToString); |
| 1318 } catch (e) { | 1318 } catch (e) { |
| 1319 text = '#<Error>'; | 1319 text = '#<Error>'; |
| 1320 } | 1320 } |
| 1321 return text; | 1321 return text; |
| 1322 }; | 1322 }; |
| 1323 | 1323 |
| 1324 | 1324 |
| 1325 /** | 1325 /** |
| 1326 * Mirror object for a Promise object. | 1326 * Mirror object for a Promise object. |
| 1327 * @param {Object} value The Promise object | 1327 * @param {Object} value The Promise object |
| (...skipping 1734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3062 } | 3062 } |
| 3063 if (!NUMBER_IS_FINITE(value)) { | 3063 if (!NUMBER_IS_FINITE(value)) { |
| 3064 if (value > 0) { | 3064 if (value > 0) { |
| 3065 return 'Infinity'; | 3065 return 'Infinity'; |
| 3066 } else { | 3066 } else { |
| 3067 return '-Infinity'; | 3067 return '-Infinity'; |
| 3068 } | 3068 } |
| 3069 } | 3069 } |
| 3070 return value; | 3070 return value; |
| 3071 } | 3071 } |
| OLD | NEW |