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

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

Issue 8701006: Clean up JavaScript files to better follow coding standard. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « src/messages.js ('k') | src/string.js » ('j') | src/v8natives.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after
1692 result += '[unresolved]'; 1692 result += '[unresolved]';
1693 } 1693 }
1694 1694
1695 return result; 1695 return result;
1696 } 1696 }
1697 1697
1698 1698
1699 FrameMirror.prototype.localsText = function() { 1699 FrameMirror.prototype.localsText = function() {
1700 // Format local variables. 1700 // Format local variables.
1701 var result = ''; 1701 var result = '';
1702 var locals_count = this.localCount() 1702 var locals_count = this.localCount();
1703 if (locals_count > 0) { 1703 if (locals_count > 0) {
1704 for (var i = 0; i < locals_count; ++i) { 1704 for (var i = 0; i < locals_count; ++i) {
1705 result += ' var '; 1705 result += ' var ';
1706 result += this.localName(i); 1706 result += this.localName(i);
1707 result += ' = '; 1707 result += ' = ';
1708 result += this.localValue(i).toText(); 1708 result += this.localValue(i).toText();
1709 if (i < locals_count - 1) result += '\n'; 1709 if (i < locals_count - 1) result += '\n';
1710 } 1710 }
1711 } 1711 }
1712 1712
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
2132 2132
2133 case OBJECT_TYPE: 2133 case OBJECT_TYPE:
2134 case FUNCTION_TYPE: 2134 case FUNCTION_TYPE:
2135 case ERROR_TYPE: 2135 case ERROR_TYPE:
2136 case REGEXP_TYPE: 2136 case REGEXP_TYPE:
2137 // Add object representation. 2137 // Add object representation.
2138 this.serializeObject_(mirror, content, details); 2138 this.serializeObject_(mirror, content, details);
2139 break; 2139 break;
2140 2140
2141 case PROPERTY_TYPE: 2141 case PROPERTY_TYPE:
2142 throw new Error('PropertyMirror cannot be serialized independeltly') 2142 throw new Error('PropertyMirror cannot be serialized independeltly');
2143 break; 2143 break;
2144 2144
2145 case FRAME_TYPE: 2145 case FRAME_TYPE:
2146 // Add object representation. 2146 // Add object representation.
2147 this.serializeFrame_(mirror, content); 2147 this.serializeFrame_(mirror, content);
2148 break; 2148 break;
2149 2149
2150 case SCOPE_TYPE: 2150 case SCOPE_TYPE:
2151 // Add object representation. 2151 // Add object representation.
2152 this.serializeScope_(mirror, content); 2152 this.serializeScope_(mirror, content);
(...skipping 19 matching lines...) Expand all
2172 } 2172 }
2173 content.sourceLength = mirror.source().length; 2173 content.sourceLength = mirror.source().length;
2174 content.scriptType = mirror.scriptType(); 2174 content.scriptType = mirror.scriptType();
2175 content.compilationType = mirror.compilationType(); 2175 content.compilationType = mirror.compilationType();
2176 // For compilation type eval emit information on the script from which 2176 // For compilation type eval emit information on the script from which
2177 // eval was called if a script is present. 2177 // eval was called if a script is present.
2178 if (mirror.compilationType() == 1 && 2178 if (mirror.compilationType() == 1 &&
2179 mirror.evalFromScript()) { 2179 mirror.evalFromScript()) {
2180 content.evalFromScript = 2180 content.evalFromScript =
2181 this.serializeReference(mirror.evalFromScript()); 2181 this.serializeReference(mirror.evalFromScript());
2182 var evalFromLocation = mirror.evalFromLocation() 2182 var evalFromLocation = mirror.evalFromLocation();
2183 if (evalFromLocation) { 2183 if (evalFromLocation) {
2184 content.evalFromLocation = { line: evalFromLocation.line, 2184 content.evalFromLocation = { line: evalFromLocation.line,
2185 column: evalFromLocation.column }; 2185 column: evalFromLocation.column };
2186 } 2186 }
2187 if (mirror.evalFromFunctionName()) { 2187 if (mirror.evalFromFunctionName()) {
2188 content.evalFromFunctionName = mirror.evalFromFunctionName(); 2188 content.evalFromFunctionName = mirror.evalFromFunctionName();
2189 } 2189 }
2190 } 2190 }
2191 if (mirror.context()) { 2191 if (mirror.context()) {
2192 content.context = this.serializeReference(mirror.context()); 2192 content.context = this.serializeReference(mirror.context());
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
2355 } 2355 }
2356 content.constructCall = mirror.isConstructCall(); 2356 content.constructCall = mirror.isConstructCall();
2357 content.atReturn = mirror.isAtReturn(); 2357 content.atReturn = mirror.isAtReturn();
2358 if (mirror.isAtReturn()) { 2358 if (mirror.isAtReturn()) {
2359 content.returnValue = this.serializeReference(mirror.returnValue()); 2359 content.returnValue = this.serializeReference(mirror.returnValue());
2360 } 2360 }
2361 content.debuggerFrame = mirror.isDebuggerFrame(); 2361 content.debuggerFrame = mirror.isDebuggerFrame();
2362 var x = new Array(mirror.argumentCount()); 2362 var x = new Array(mirror.argumentCount());
2363 for (var i = 0; i < mirror.argumentCount(); i++) { 2363 for (var i = 0; i < mirror.argumentCount(); i++) {
2364 var arg = {}; 2364 var arg = {};
2365 var argument_name = mirror.argumentName(i) 2365 var argument_name = mirror.argumentName(i);
2366 if (argument_name) { 2366 if (argument_name) {
2367 arg.name = argument_name; 2367 arg.name = argument_name;
2368 } 2368 }
2369 arg.value = this.serializeReference(mirror.argumentValue(i)); 2369 arg.value = this.serializeReference(mirror.argumentValue(i));
2370 x[i] = arg; 2370 x[i] = arg;
2371 } 2371 }
2372 content.arguments = x; 2372 content.arguments = x;
2373 var x = new Array(mirror.localCount()); 2373 var x = new Array(mirror.localCount());
2374 for (var i = 0; i < mirror.localCount(); i++) { 2374 for (var i = 0; i < mirror.localCount(); i++) {
2375 var local = {}; 2375 var local = {};
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « src/messages.js ('k') | src/string.js » ('j') | src/v8natives.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698