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 2293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2304 | 2304 |
2305 | 2305 |
2306 DebugCommandProcessor.prototype.versionRequest_ = function(request, response) { | 2306 DebugCommandProcessor.prototype.versionRequest_ = function(request, response) { |
2307 response.body = { | 2307 response.body = { |
2308 V8Version: %GetV8Version() | 2308 V8Version: %GetV8Version() |
2309 } | 2309 } |
2310 }; | 2310 }; |
2311 | 2311 |
2312 | 2312 |
2313 DebugCommandProcessor.prototype.profileRequest_ = function(request, response) { | 2313 DebugCommandProcessor.prototype.profileRequest_ = function(request, response) { |
2314 if (!request.arguments) { | |
2315 return response.failed('Missing arguments'); | |
2316 } | |
2317 var modules = parseInt(request.arguments.modules); | |
2318 if (isNaN(modules)) { | |
2319 return response.failed('Modules is not an integer'); | |
2320 } | |
2321 var tag = parseInt(request.arguments.tag); | |
2322 if (isNaN(tag)) { | |
2323 tag = 0; | |
2324 } | |
2325 if (request.arguments.command == 'resume') { | 2314 if (request.arguments.command == 'resume') { |
2326 %ProfilerResume(modules, tag); | 2315 %ProfilerResume(); |
2327 } else if (request.arguments.command == 'pause') { | 2316 } else if (request.arguments.command == 'pause') { |
2328 %ProfilerPause(modules, tag); | 2317 %ProfilerPause(); |
2329 } else { | 2318 } else { |
2330 return response.failed('Unknown command'); | 2319 return response.failed('Unknown command'); |
2331 } | 2320 } |
2332 response.body = {}; | 2321 response.body = {}; |
2333 }; | 2322 }; |
2334 | 2323 |
2335 | 2324 |
2336 DebugCommandProcessor.prototype.changeLiveRequest_ = function(request, response)
{ | 2325 DebugCommandProcessor.prototype.changeLiveRequest_ = function(request, response)
{ |
2337 if (!Debug.LiveEdit) { | 2326 if (!Debug.LiveEdit) { |
2338 return response.failed('LiveEdit feature is not supported'); | 2327 return response.failed('LiveEdit feature is not supported'); |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2602 case 'string': | 2591 case 'string': |
2603 case 'number': | 2592 case 'number': |
2604 json = value; | 2593 json = value; |
2605 break | 2594 break |
2606 | 2595 |
2607 default: | 2596 default: |
2608 json = null; | 2597 json = null; |
2609 } | 2598 } |
2610 return json; | 2599 return json; |
2611 } | 2600 } |
OLD | NEW |