Ejemplo n.º 1
0
 /** Called when the stack frame is entered. */
 public void onEnter(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) {
   contextData.pushFrame(this);
   this.scope = scope;
   this.thisObj = thisObj;
   if (dim.breakOnEnter) {
     dim.handleBreakpointHit(this, cx);
   }
 }
Ejemplo n.º 2
0
    /** Called when the current position has changed. */
    public void onLineChange(Context cx, int lineno) {
      this.lineNumber = lineno;

      if (!breakpoints[lineno] && !dim.breakFlag) {
        boolean lineBreak = contextData.breakNextLine;
        if (lineBreak && contextData.stopAtFrameDepth >= 0) {
          lineBreak = (contextData.frameCount() <= contextData.stopAtFrameDepth);
        }
        if (!lineBreak) {
          return;
        }
        contextData.stopAtFrameDepth = -1;
        contextData.breakNextLine = false;
      }

      dim.handleBreakpointHit(this, cx);
    }
Ejemplo n.º 3
0
 /** Called when a 'debugger' statement is executed. */
 public void onDebuggerStatement(Context cx) {
   dim.handleBreakpointHit(this, cx);
 }
Ejemplo n.º 4
0
 /** Called when the stack frame has been left. */
 public void onExit(Context cx, boolean byThrow, Object resultOrException) {
   if (dim.breakOnReturn && !byThrow) {
     dim.handleBreakpointHit(this, cx);
   }
   contextData.popFrame();
 }