| 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 | 4 |
| 5 (function(global, utils) { | 5 (function(global, utils) { |
| 6 "use strict"; | 6 "use strict"; |
| 7 | 7 |
| 8 // ---------------------------------------------------------------------------- | 8 // ---------------------------------------------------------------------------- |
| 9 // Imports | 9 // Imports |
| 10 | 10 |
| 11 var ErrorToString; | |
| 12 var GlobalArray = global.Array; | 11 var GlobalArray = global.Array; |
| 13 var IsNaN = global.isNaN; | 12 var IsNaN = global.isNaN; |
| 14 var JSONStringify = global.JSON.stringify; | 13 var JSONStringify = global.JSON.stringify; |
| 15 var MakeError; | 14 var MakeError; |
| 16 var MapEntries; | 15 var MapEntries; |
| 17 var MapIteratorNext; | 16 var MapIteratorNext; |
| 18 var promiseStateSymbol = utils.ImportNow("promise_state_symbol"); | 17 var promiseStateSymbol = utils.ImportNow("promise_state_symbol"); |
| 19 var promiseResultSymbol = utils.ImportNow("promise_result_symbol"); | 18 var promiseResultSymbol = utils.ImportNow("promise_result_symbol"); |
| 20 var SetIteratorNext; | 19 var SetIteratorNext; |
| 21 var SetValues; | 20 var SetValues; |
| 22 | 21 |
| 23 utils.Import(function(from) { | 22 utils.Import(function(from) { |
| 24 ErrorToString = from.ErrorToString; | |
| 25 MakeError = from.MakeError; | 23 MakeError = from.MakeError; |
| 26 MapEntries = from.MapEntries; | 24 MapEntries = from.MapEntries; |
| 27 MapIteratorNext = from.MapIteratorNext; | 25 MapIteratorNext = from.MapIteratorNext; |
| 28 SetIteratorNext = from.SetIteratorNext; | 26 SetIteratorNext = from.SetIteratorNext; |
| 29 SetValues = from.SetValues; | 27 SetValues = from.SetValues; |
| 30 }); | 28 }); |
| 31 | 29 |
| 32 // ---------------------------------------------------------------------------- | 30 // ---------------------------------------------------------------------------- |
| 33 | 31 |
| 34 // Mirror hierarchy: | 32 // Mirror hierarchy: |
| (...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1248 */ | 1246 */ |
| 1249 ErrorMirror.prototype.message = function() { | 1247 ErrorMirror.prototype.message = function() { |
| 1250 return this.value_.message; | 1248 return this.value_.message; |
| 1251 }; | 1249 }; |
| 1252 | 1250 |
| 1253 | 1251 |
| 1254 ErrorMirror.prototype.toText = function() { | 1252 ErrorMirror.prototype.toText = function() { |
| 1255 // Use the same text representation as in messages.js. | 1253 // Use the same text representation as in messages.js. |
| 1256 var text; | 1254 var text; |
| 1257 try { | 1255 try { |
| 1258 text = %_Call(ErrorToString, this.value_); | 1256 text = %ErrorToString(this.value_); |
| 1259 } catch (e) { | 1257 } catch (e) { |
| 1260 text = '#<Error>'; | 1258 text = '#<Error>'; |
| 1261 } | 1259 } |
| 1262 return text; | 1260 return text; |
| 1263 }; | 1261 }; |
| 1264 | 1262 |
| 1265 | 1263 |
| 1266 /** | 1264 /** |
| 1267 * Mirror object for a Promise object. | 1265 * Mirror object for a Promise object. |
| 1268 * @param {Object} value The Promise object | 1266 * @param {Object} value The Promise object |
| (...skipping 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3052 // Functions needed by the debugger runtime. | 3050 // Functions needed by the debugger runtime. |
| 3053 utils.InstallFunctions(utils, DONT_ENUM, [ | 3051 utils.InstallFunctions(utils, DONT_ENUM, [ |
| 3054 "ClearMirrorCache", ClearMirrorCache | 3052 "ClearMirrorCache", ClearMirrorCache |
| 3055 ]); | 3053 ]); |
| 3056 | 3054 |
| 3057 // Export to debug.js | 3055 // Export to debug.js |
| 3058 utils.Export(function(to) { | 3056 utils.Export(function(to) { |
| 3059 to.MirrorType = MirrorType; | 3057 to.MirrorType = MirrorType; |
| 3060 }); | 3058 }); |
| 3061 }) | 3059 }) |
| OLD | NEW |