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 2214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2225 content.line = line; | 2225 content.line = line; |
2226 } | 2226 } |
2227 var column = mirror.sourceColumn(); | 2227 var column = mirror.sourceColumn(); |
2228 if (!IS_UNDEFINED(column)) { | 2228 if (!IS_UNDEFINED(column)) { |
2229 content.column = column; | 2229 content.column = column; |
2230 } | 2230 } |
2231 var source_line_text = mirror.sourceLineText(); | 2231 var source_line_text = mirror.sourceLineText(); |
2232 if (!IS_UNDEFINED(source_line_text)) { | 2232 if (!IS_UNDEFINED(source_line_text)) { |
2233 content.sourceLineText = source_line_text; | 2233 content.sourceLineText = source_line_text; |
2234 } | 2234 } |
| 2235 |
| 2236 content.scopes = []; |
| 2237 for (var i = 0; i < mirror.scopeCount(); i++) { |
| 2238 var scope = mirror.scope(i); |
| 2239 content.scopes.push({ |
| 2240 type: scope.scopeType(), |
| 2241 index: i |
| 2242 }); |
| 2243 } |
2235 } | 2244 } |
2236 | 2245 |
2237 | 2246 |
2238 JSONProtocolSerializer.prototype.serializeScope_ = function(mirror, content) { | 2247 JSONProtocolSerializer.prototype.serializeScope_ = function(mirror, content) { |
2239 content.index = mirror.scopeIndex(); | 2248 content.index = mirror.scopeIndex(); |
2240 content.frameIndex = mirror.frameIndex(); | 2249 content.frameIndex = mirror.frameIndex(); |
2241 content.type = mirror.scopeType(); | 2250 content.type = mirror.scopeType(); |
2242 content.object = this.serializeReference(mirror.scopeObject()); | 2251 content.object = this.serializeReference(mirror.scopeObject()); |
2243 } | 2252 } |
2244 | 2253 |
(...skipping 13 matching lines...) Expand all Loading... |
2258 } | 2267 } |
2259 if (!isFinite(value)) { | 2268 if (!isFinite(value)) { |
2260 if (value > 0) { | 2269 if (value > 0) { |
2261 return 'Infinity'; | 2270 return 'Infinity'; |
2262 } else { | 2271 } else { |
2263 return '-Infinity'; | 2272 return '-Infinity'; |
2264 } | 2273 } |
2265 } | 2274 } |
2266 return value; | 2275 return value; |
2267 } | 2276 } |
OLD | NEW |