| 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 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1328 return new ProtocolMessage(request); | 1328 return new ProtocolMessage(request); |
| 1329 }; | 1329 }; |
| 1330 | 1330 |
| 1331 | 1331 |
| 1332 DebugCommandProcessor.prototype.processDebugJSONRequest = function(json_request)
{ | 1332 DebugCommandProcessor.prototype.processDebugJSONRequest = function(json_request)
{ |
| 1333 var request; // Current request. | 1333 var request; // Current request. |
| 1334 var response; // Generated response. | 1334 var response; // Generated response. |
| 1335 try { | 1335 try { |
| 1336 try { | 1336 try { |
| 1337 // Convert the JSON string to an object. | 1337 // Convert the JSON string to an object. |
| 1338 request = %CompileString('(' + json_request + ')')(); | 1338 request = JSON.parse(json_request); |
| 1339 | 1339 |
| 1340 // Create an initial response. | 1340 // Create an initial response. |
| 1341 response = this.createResponse(request); | 1341 response = this.createResponse(request); |
| 1342 | 1342 |
| 1343 if (!request.type) { | 1343 if (!request.type) { |
| 1344 throw new Error('Type not specified'); | 1344 throw new Error('Type not specified'); |
| 1345 } | 1345 } |
| 1346 | 1346 |
| 1347 if (request.type != 'request') { | 1347 if (request.type != 'request') { |
| 1348 throw new Error("Illegal type '" + request.type + "' in request"); | 1348 throw new Error("Illegal type '" + request.type + "' in request"); |
| (...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2560 case 'string': | 2560 case 'string': |
| 2561 case 'number': | 2561 case 'number': |
| 2562 json = value; | 2562 json = value; |
| 2563 break | 2563 break |
| 2564 | 2564 |
| 2565 default: | 2565 default: |
| 2566 json = null; | 2566 json = null; |
| 2567 } | 2567 } |
| 2568 return json; | 2568 return json; |
| 2569 } | 2569 } |
| OLD | NEW |