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 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1342 if (this.body[i] instanceof Mirror) { | 1342 if (this.body[i] instanceof Mirror) { |
1343 bodyJson.push(serializer.serializeValue(this.body[i])); | 1343 bodyJson.push(serializer.serializeValue(this.body[i])); |
1344 } else { | 1344 } else { |
1345 bodyJson.push(ObjectToProtocolObject_(this.body[i], serializer)); | 1345 bodyJson.push(ObjectToProtocolObject_(this.body[i], serializer)); |
1346 } | 1346 } |
1347 } | 1347 } |
1348 } else { | 1348 } else { |
1349 bodyJson = ObjectToProtocolObject_(this.body, serializer); | 1349 bodyJson = ObjectToProtocolObject_(this.body, serializer); |
1350 } | 1350 } |
1351 json.body = bodyJson; | 1351 json.body = bodyJson; |
1352 json.refs = serializer.serializeReferencedObjects(); | 1352 if (!this.options_ || !this.options_.noRefs) { |
Peter Rybin
2011/12/14 12:22:22
What happens if you use includeRefs options here i
indutny
2011/12/14 12:33:08
You mean includeRefs: true, right?
Looks like thi
Peter Rybin
2011/12/14 18:13:55
Your change allows user to reject "refs" from the
| |
1353 json.refs = serializer.serializeReferencedObjects(); | |
1354 } | |
1353 } | 1355 } |
1354 if (this.message) { | 1356 if (this.message) { |
1355 json.message = this.message; | 1357 json.message = this.message; |
1356 } | 1358 } |
1357 json.running = this.running; | 1359 json.running = this.running; |
1358 return JSON.stringify(json); | 1360 return JSON.stringify(json); |
1359 }; | 1361 }; |
1360 | 1362 |
1361 | 1363 |
1362 DebugCommandProcessor.prototype.createResponse = function(request) { | 1364 DebugCommandProcessor.prototype.createResponse = function(request) { |
(...skipping 25 matching lines...) Expand all Loading... | |
1388 throw new Error('Command not specified'); | 1390 throw new Error('Command not specified'); |
1389 } | 1391 } |
1390 | 1392 |
1391 if (request.arguments) { | 1393 if (request.arguments) { |
1392 var args = request.arguments; | 1394 var args = request.arguments; |
1393 // TODO(yurys): remove request.arguments.compactFormat check once | 1395 // TODO(yurys): remove request.arguments.compactFormat check once |
1394 // ChromeDevTools are switched to 'inlineRefs' | 1396 // ChromeDevTools are switched to 'inlineRefs' |
1395 if (args.inlineRefs || args.compactFormat) { | 1397 if (args.inlineRefs || args.compactFormat) { |
1396 response.setOption('inlineRefs', true); | 1398 response.setOption('inlineRefs', true); |
1397 } | 1399 } |
1400 if (args.noRefs) { | |
1401 response.setOption('noRefs', true); | |
1402 } | |
1398 if (!IS_UNDEFINED(args.maxStringLength)) { | 1403 if (!IS_UNDEFINED(args.maxStringLength)) { |
1399 response.setOption('maxStringLength', args.maxStringLength); | 1404 response.setOption('maxStringLength', args.maxStringLength); |
1400 } | 1405 } |
1401 } | 1406 } |
1402 | 1407 |
1403 if (request.command == 'continue') { | 1408 if (request.command == 'continue') { |
1404 this.continueRequest_(request, response); | 1409 this.continueRequest_(request, response); |
1405 } else if (request.command == 'break') { | 1410 } else if (request.command == 'break') { |
1406 this.breakRequest_(request, response); | 1411 this.breakRequest_(request, response); |
1407 } else if (request.command == 'setbreakpoint') { | 1412 } else if (request.command == 'setbreakpoint') { |
(...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2606 case 'string': | 2611 case 'string': |
2607 case 'number': | 2612 case 'number': |
2608 json = value; | 2613 json = value; |
2609 break; | 2614 break; |
2610 | 2615 |
2611 default: | 2616 default: |
2612 json = null; | 2617 json = null; |
2613 } | 2618 } |
2614 return json; | 2619 return json; |
2615 } | 2620 } |
OLD | NEW |