/** 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);
   }
 }
    /** 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);
    }
 /** Called when a 'debugger' statement is executed. */
 public void onDebuggerStatement(Context cx) {
   dim.handleBreakpointHit(this, cx);
 }
 /** 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();
 }