| 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 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1294 return new ProtocolMessage(request); | 1294 return new ProtocolMessage(request); |
| 1295 }; | 1295 }; |
| 1296 | 1296 |
| 1297 | 1297 |
| 1298 DebugCommandProcessor.prototype.processDebugJSONRequest = function(json_request)
{ | 1298 DebugCommandProcessor.prototype.processDebugJSONRequest = function(json_request)
{ |
| 1299 var request; // Current request. | 1299 var request; // Current request. |
| 1300 var response; // Generated response. | 1300 var response; // Generated response. |
| 1301 try { | 1301 try { |
| 1302 try { | 1302 try { |
| 1303 // Convert the JSON string to an object. | 1303 // Convert the JSON string to an object. |
| 1304 request = %CompileString('(' + json_request + ')', false)(); | 1304 request = %CompileString('(' + json_request + ')')(); |
| 1305 | 1305 |
| 1306 // Create an initial response. | 1306 // Create an initial response. |
| 1307 response = this.createResponse(request); | 1307 response = this.createResponse(request); |
| 1308 | 1308 |
| 1309 if (!request.type) { | 1309 if (!request.type) { |
| 1310 throw new Error('Type not specified'); | 1310 throw new Error('Type not specified'); |
| 1311 } | 1311 } |
| 1312 | 1312 |
| 1313 if (request.type != 'request') { | 1313 if (request.type != 'request') { |
| 1314 throw new Error("Illegal type '" + request.type + "' in request"); | 1314 throw new Error("Illegal type '" + request.type + "' in request"); |
| (...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2302 case 'string': | 2302 case 'string': |
| 2303 case 'number': | 2303 case 'number': |
| 2304 json = value; | 2304 json = value; |
| 2305 break | 2305 break |
| 2306 | 2306 |
| 2307 default: | 2307 default: |
| 2308 json = null; | 2308 json = null; |
| 2309 } | 2309 } |
| 2310 return json; | 2310 return json; |
| 2311 } | 2311 } |
| OLD | NEW |