This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

debugger: prevent crash when backtrace doesn't come back

  • Loading branch information...
1 parent fbb7478 commit 1f041fe73e73e69b0253deb0df58e856f3b650e1 @ry ry committed Jan 28, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/_debugger.js
View
@@ -261,6 +261,12 @@ Client.prototype.reqEval = function(expression, cb) {
// Otherwise we need to get the current frame to see which scopes it has.
this.reqBacktrace(function(bt) {
+ if (!bt.frames) {
+ // ??
+ cb({});
+ return;
+ }
+
var frame = bt.frames[self.currentFrame];
var evalFrames = frame.scopes.map(function(s) {

0 comments on commit 1f041fe

Please sign in to comment.