| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1462 } else if (request.command == 'source') { | 1462 } else if (request.command == 'source') { |
| 1463 this.sourceRequest_(request, response); | 1463 this.sourceRequest_(request, response); |
| 1464 } else if (request.command == 'scripts') { | 1464 } else if (request.command == 'scripts') { |
| 1465 this.scriptsRequest_(request, response); | 1465 this.scriptsRequest_(request, response); |
| 1466 } else if (request.command == 'threads') { | 1466 } else if (request.command == 'threads') { |
| 1467 this.threadsRequest_(request, response); | 1467 this.threadsRequest_(request, response); |
| 1468 } else if (request.command == 'suspend') { | 1468 } else if (request.command == 'suspend') { |
| 1469 this.suspendRequest_(request, response); | 1469 this.suspendRequest_(request, response); |
| 1470 } else if (request.command == 'version') { | 1470 } else if (request.command == 'version') { |
| 1471 this.versionRequest_(request, response); | 1471 this.versionRequest_(request, response); |
| 1472 } else if (request.command == 'profile') { | |
| 1473 this.profileRequest_(request, response); | |
| 1474 } else if (request.command == 'changelive') { | 1472 } else if (request.command == 'changelive') { |
| 1475 this.changeLiveRequest_(request, response); | 1473 this.changeLiveRequest_(request, response); |
| 1476 } else if (request.command == 'restartframe') { | 1474 } else if (request.command == 'restartframe') { |
| 1477 this.restartFrameRequest_(request, response); | 1475 this.restartFrameRequest_(request, response); |
| 1478 } else if (request.command == 'flags') { | 1476 } else if (request.command == 'flags') { |
| 1479 this.debuggerFlagsRequest_(request, response); | 1477 this.debuggerFlagsRequest_(request, response); |
| 1480 } else if (request.command == 'v8flags') { | 1478 } else if (request.command == 'v8flags') { |
| 1481 this.v8FlagsRequest_(request, response); | 1479 this.v8FlagsRequest_(request, response); |
| 1482 | 1480 |
| 1483 // GC tools: | 1481 // GC tools: |
| (...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2393 }; | 2391 }; |
| 2394 | 2392 |
| 2395 | 2393 |
| 2396 DebugCommandProcessor.prototype.versionRequest_ = function(request, response) { | 2394 DebugCommandProcessor.prototype.versionRequest_ = function(request, response) { |
| 2397 response.body = { | 2395 response.body = { |
| 2398 V8Version: %GetV8Version() | 2396 V8Version: %GetV8Version() |
| 2399 }; | 2397 }; |
| 2400 }; | 2398 }; |
| 2401 | 2399 |
| 2402 | 2400 |
| 2403 DebugCommandProcessor.prototype.profileRequest_ = function(request, response) { | |
| 2404 if (request.arguments.command == 'resume') { | |
| 2405 %ProfilerResume(); | |
| 2406 } else if (request.arguments.command == 'pause') { | |
| 2407 %ProfilerPause(); | |
| 2408 } else { | |
| 2409 return response.failed('Unknown command'); | |
| 2410 } | |
| 2411 response.body = {}; | |
| 2412 }; | |
| 2413 | |
| 2414 | |
| 2415 DebugCommandProcessor.prototype.changeLiveRequest_ = function( | 2401 DebugCommandProcessor.prototype.changeLiveRequest_ = function( |
| 2416 request, response) { | 2402 request, response) { |
| 2417 if (!request.arguments) { | 2403 if (!request.arguments) { |
| 2418 return response.failed('Missing arguments'); | 2404 return response.failed('Missing arguments'); |
| 2419 } | 2405 } |
| 2420 var script_id = request.arguments.script_id; | 2406 var script_id = request.arguments.script_id; |
| 2421 var preview_only = !!request.arguments.preview_only; | 2407 var preview_only = !!request.arguments.preview_only; |
| 2422 | 2408 |
| 2423 var scripts = %DebugGetLoadedScripts(); | 2409 var scripts = %DebugGetLoadedScripts(); |
| 2424 | 2410 |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2643 | 2629 |
| 2644 default: | 2630 default: |
| 2645 json = null; | 2631 json = null; |
| 2646 } | 2632 } |
| 2647 return json; | 2633 return json; |
| 2648 } | 2634 } |
| 2649 | 2635 |
| 2650 Debug.TestApi = { | 2636 Debug.TestApi = { |
| 2651 CommandProcessorResolveValue: DebugCommandProcessor.resolveValue_ | 2637 CommandProcessorResolveValue: DebugCommandProcessor.resolveValue_ |
| 2652 }; | 2638 }; |
| OLD | NEW |