function TA_onScripts(aRequest) {
    if (this.state == "exited") {
      return { type: "exited" };
    } else if (this.state == "paused") {
      // TODO: return the actual reason for the existing pause.
      return { type: "paused", why: { type: "alreadyPaused" } };
    } else if (this.state != "running") {
      return { error: "wrongState",
               message: "Received interrupt request in " + this.state +
                        " state." };
    }

    try {
      // Put ourselves in the paused state.
      let packet = this._paused();
      if (!packet) {
        return { error: "notInterrupted" };
      }
      packet.why = { type: "interrupted" };

      // Send the response to the interrupt request now (rather than
      // returning it), because we're going to start a nested event loop
      // here.
      this.conn.send(packet);

      // Start a nested event loop.
      this._nest();

      // We already sent a response to this request, don't send one
      // now.
      return null;
    } catch(e) {
      Cu.reportError(e);
      return { error: "notInterrupted", message: e.toString() };
    }
  }
/**
   * Handle a protocol request to pause the debuggee.
   */
Handle a protocol request to pause the debuggee.
Handle a protocol request to pause the debuggee .
function TA_onScripts(aRequest) {
    if (this.state == "exited") {
      return { type: "exited" };
    } else if (this.state == "paused") {
      return { type: "paused", why: { type: "alreadyPaused" } };
    } else if (this.state != "running") {
      return { error: "wrongState",
               message: "Received interrupt request in " + this.state +
                        " state." };
    }
    try {
      let packet = this._paused();
      if (!packet) {
        return { error: "notInterrupted" };
      }
      packet.why = { type: "interrupted" };
      this.conn.send(packet);
      this._nest();
      return null;
    } catch(e) {
      Cu.reportError(e);
      return { error: "notInterrupted", message: e.toString() };
    }
  }
function TA_onScripts ( aRequest ) { if ( this . state == "exited" ) { return { type : "exited" } ; } else if ( this . state == "paused" ) { return { type : "paused" , why : { type : "alreadyPaused" } } ; } else if ( this . state != "running" ) { return { error : "wrongState" , message : "Received interrupt request in " + this . state + " state." } ; } try { let packet = this . _paused ( ) ; if ( ! packet ) { return { error : "notInterrupted" } ; } packet . why = { type : "interrupted" } ; this . conn . send ( packet ) ; this . _nest ( ) ; return null ; } catch ( e ) { Cu . reportError ( e ) ; return { error : "notInterrupted" , message : e . toString ( ) } ; } }
Handle a protocol request to pause the debuggee.
Handle a protocol request to pause the debuggee .
// TODO: return the actual reason for the existing pause. // Put ourselves in the paused state. // Send the response to the interrupt request now (rather than // returning it), because we're going to start a nested event loop // here. // Start a nested event loop. // We already sent a response to this request, don't send one // now.