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

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

Issue 1106633002: Wrap messages implementation in a function. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@messages_5
Patch Set: fix and rebase Created 5 years, 8 months 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
« no previous file with comments | « src/messages.js ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/messages.js ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698