Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Side by Side Diff: src/debug-debugger.js

Issue 4135004: Separate JSON parsing from the JavaScript parser. (Closed)
Patch Set: Rename GetSymbol. Move ZoneScope. Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler.cc ('k') | src/json.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/json.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698