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 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1132 return new ProtocolMessage(request); | 1132 return new ProtocolMessage(request); |
1133 }; | 1133 }; |
1134 | 1134 |
1135 | 1135 |
1136 DebugCommandProcessor.prototype.processDebugJSONRequest = function(json_request)
{ | 1136 DebugCommandProcessor.prototype.processDebugJSONRequest = function(json_request)
{ |
1137 var request; // Current request. | 1137 var request; // Current request. |
1138 var response; // Generated response. | 1138 var response; // Generated response. |
1139 try { | 1139 try { |
1140 try { | 1140 try { |
1141 // Convert the JSON string to an object. | 1141 // Convert the JSON string to an object. |
1142 request = %CompileString('(' + json_request + ')', 0, false)(); | 1142 request = %CompileString('(' + json_request + ')', false)(); |
1143 | 1143 |
1144 // Create an initial response. | 1144 // Create an initial response. |
1145 response = this.createResponse(request); | 1145 response = this.createResponse(request); |
1146 | 1146 |
1147 if (!request.type) { | 1147 if (!request.type) { |
1148 throw new Error('Type not specified'); | 1148 throw new Error('Type not specified'); |
1149 } | 1149 } |
1150 | 1150 |
1151 if (request.type != 'request') { | 1151 if (request.type != 'request') { |
1152 throw new Error("Illegal type '" + request.type + "' in request"); | 1152 throw new Error("Illegal type '" + request.type + "' in request"); |
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1874 case 'string': | 1874 case 'string': |
1875 case 'number': | 1875 case 'number': |
1876 json = value; | 1876 json = value; |
1877 break | 1877 break |
1878 | 1878 |
1879 default: | 1879 default: |
1880 json = null; | 1880 json = null; |
1881 } | 1881 } |
1882 return json; | 1882 return json; |
1883 } | 1883 } |
OLD | NEW |