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

Unified Diff: src/d8.js

Issue 21350: Better handling debug evaluation when there is no JavaScript stack (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 10 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 | src/debug-delay.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.js
===================================================================
--- src/d8.js (revision 1268)
+++ src/d8.js (working copy)
@@ -381,6 +381,10 @@
var request = this.createRequest('evaluate');
request.arguments = {};
request.arguments.expression = expression;
+ // Request a global evaluation if there is no current frame.
+ if (Debug.State.currentFrame == kNoFrame) {
+ request.arguments.global = true;
+ }
return request.toJSONProtocol();
}
};
@@ -795,7 +799,7 @@
case 'evaluate':
case 'lookup':
if (last_cmd == 'p' || last_cmd == 'print') {
- details.text = body.text;
+ result = body.text;
} else {
var value = response.bodyValue();
if (value.isObject()) {
@@ -984,10 +988,10 @@
ProtocolPackage.prototype.bodyValue = function(index) {
- if (IS_UNDEFINED(index)) {
+ if (index) {
+ return new ProtocolValue(this.packet_.body[index], this);
+ } else {
return new ProtocolValue(this.packet_.body, this);
- } else {
- return new ProtocolValue(this.packet_.body[index], this);
}
}
« no previous file with comments | « no previous file | src/debug-delay.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698