Index: src/debug-delay.js |
=================================================================== |
--- src/debug-delay.js (revision 1131) |
+++ src/debug-delay.js (working copy) |
@@ -1071,6 +1071,8 @@ |
this.frameRequest_(request, response); |
} else if (request.command == 'evaluate') { |
this.evaluateRequest_(request, response); |
+ } else if (request.command == 'lookup') { |
+ this.lookupRequest_(request, response); |
} else if (request.command == 'source') { |
this.sourceRequest_(request, response); |
} else if (request.command == 'scripts') { |
@@ -1434,6 +1436,29 @@ |
}; |
+DebugCommandProcessor.prototype.lookupRequest_ = function(request, response) { |
+ if (!request.arguments) { |
+ return response.failed('Missing arguments'); |
+ } |
+ |
+ // Pull out arguments. |
+ var handle = request.arguments.handle; |
+ |
+ // Check for legal arguments. |
+ if (IS_UNDEFINED(handle)) { |
+ return response.failed('Argument "handle" missing'); |
+ } |
+ |
+ // Lookup handle. |
+ var mirror = LookupMirror(handle); |
+ if (mirror) { |
+ response.body = mirror; |
+ } else { |
+ return response.failed('Object #' + handle + '# not found'); |
+ } |
+}; |
+ |
+ |
DebugCommandProcessor.prototype.sourceRequest_ = function(request, response) { |
// No frames no source. |
if (this.exec_state_.frameCount() == 0) { |