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

Unified Diff: src/debug-delay.js

Issue 20039: Minor debugger cleanup. Store the running state of the previous debugger resp... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug-delay.js
===================================================================
--- src/debug-delay.js (revision 1220)
+++ src/debug-delay.js (working copy)
@@ -945,6 +945,7 @@
function DebugCommandProcessor(exec_state) {
this.exec_state_ = exec_state;
+ this.running_ = false;
};
@@ -953,11 +954,6 @@
}
-DebugCommandProcessor.prototype.responseIsRunning = function (response) {
- return this.isRunning(response);
-}
-
-
function ResponsePacket(request) {
// Build the initial response from the request.
this.seq = next_response_seq++;
@@ -1032,7 +1028,7 @@
};
-DebugCommandProcessor.prototype.processDebugJSONRequest = function(json_request, stopping) {
+DebugCommandProcessor.prototype.processDebugJSONRequest = function(json_request) {
var request; // Current request.
var response; // Generated response.
try {
@@ -1091,10 +1087,7 @@
// Return the response as a JSON encoded string.
try {
- // Set the running state to what indicated.
- if (!IS_UNDEFINED(stopping)) {
- response.running = !stopping;
- }
+ this.running_ = response.running; // Store the running state.
return response.toJSONProtocol();
} catch (e) {
// Failed to generate response - return generic error.
@@ -1538,18 +1531,10 @@
};
-// Check whether the JSON response indicate that the VM should be running.
-DebugCommandProcessor.prototype.isRunning = function(json_response) {
- try {
- // Convert the JSON string to an object.
- response = %CompileString('(' + json_response + ')', 0)();
-
- // Return whether VM should be running after this request.
- return response.running;
-
- } catch (e) {
- return false;
- }
+// Check whether the previously processed command caused the VM to become
+// running.
+DebugCommandProcessor.prototype.isRunning = function() {
+ return this.running_;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698