From f4073de170b8cb1237cb9fbaf552ed7a38addeb2 Mon Sep 17 00:00:00 2001 From: "rginda%netscape.com" Date: Tue, 24 Apr 2001 00:45:45 +0000 Subject: [PATCH] -not built- add $ array to hold return values from /eval commands save currentFrameIndex into the frames array, instead of a reference to the current frame. git-svn-id: svn://10.0.0.236/trunk@92968 18797224-902f-48f8-a5cc-f745e15eee43 --- .../venkman/resources/content/venkman-debugger.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mozilla/extensions/venkman/resources/content/venkman-debugger.js b/mozilla/extensions/venkman/resources/content/venkman-debugger.js index 9ab7bdf5a1d..1ac96bc9939 100644 --- a/mozilla/extensions/venkman/resources/content/venkman-debugger.js +++ b/mozilla/extensions/venkman/resources/content/venkman-debugger.js @@ -39,6 +39,8 @@ const jsdIExecutionHook = Components.interfaces.jsdIExecutionHook; const jsdIValue = Components.interfaces.jsdIValue; const jsdIProperty = Components.interfaces.jsdIProperty; +var $ = new Array(); /* array to store results from evals in debug frames */ + console.scriptHooker = new Object(); console.scriptHooker.onScriptLoaded = function sh_scripthook (cx, script, creating) @@ -72,9 +74,11 @@ function debugTrap (cx, state, type) /* set our default return value */ console.continueCodeStack.push (jsdIExecutionHook.RETURN_CONTINUE); + $ = new Array(); console.currentContext = cx; console.currentThreadState = state; - var frame = console.currentFrame = state.topFrame; + console.currentFrameIndex = 0; + var frame = state.topFrame; /* build an array of frames */ console.frames = new Array(frame); @@ -103,7 +107,7 @@ function debugTrap (cx, state, type) if (tn) display (getMsg(MSN_STOP, tn), MT_STOP); - display (formatStackFrame(console.currentFrame)); + display (formatStackFrame(console.frames[console.currentFrameIndex])); console.jsds.enterNestedEventLoop(); @@ -114,9 +118,10 @@ function debugTrap (cx, state, type) if (tn) display (getMsg(MSN_CONT, tn), MT_CONT); + $ = new Array(); delete console.currentContext; delete console.currentThreadState; - delete console.currentFrame; + delete console.currentFrameIndex; delete console.frames; return console.continueCodeStack.pop();