function DC_onPacket(aPacket) {
    if (!this._connected) {
      // Hello packet.
      this._connected = true;
      this.notify("connected",
                  aPacket.applicationType,
                  aPacket.traits);
      return;
    }

    try {
      if (!aPacket.from) {
        Cu.reportError("Server did not specify an actor, dropping packet: " +
                       JSON.stringify(aPacket));
        return;
      }

      let onResponse;
      // Don't count unsolicited notifications as responses.
      if (aPacket.from in this._activeRequests &&
          !(aPacket.type in UnsolicitedNotifications)) {
        onResponse = this._activeRequests[aPacket.from].onResponse;
        delete this._activeRequests[aPacket.from];
      }

      // paused/resumed/detached get special treatment...
      if (aPacket.type in ThreadStateTypes &&
          aPacket.from in this._threadClients) {
        this._threadClients[aPacket.from]._onThreadState(aPacket);
      }
      this.notify(aPacket.type, aPacket);

      if (onResponse) {
        onResponse(aPacket);
      }
    } catch(ex) {
      dumpn("Error handling response: " + ex + " - stack:\n" + ex.stack);
      Cu.reportError(ex);
    }

    this._sendRequests();
  }
/**
   * Called by DebuggerTransport to dispatch incoming packets as appropriate.
   *
   * @param aPacket object
   *        The incoming packet.
   */
Called by DebuggerTransport to dispatch incoming packets as appropriate.
@param aPacket object
The incoming packet.
Called by DebuggerTransport to dispatch incoming packets as appropriate . @param aPacket object The incoming packet .
function DC_onPacket(aPacket) {
    if (!this._connected) {
      this._connected = true;
      this.notify("connected",
                  aPacket.applicationType,
                  aPacket.traits);
      return;
    }
    try {
      if (!aPacket.from) {
        Cu.reportError("Server did not specify an actor, dropping packet: " +
                       JSON.stringify(aPacket));
        return;
      }
      let onResponse;
      if (aPacket.from in this._activeRequests &&
          !(aPacket.type in UnsolicitedNotifications)) {
        onResponse = this._activeRequests[aPacket.from].onResponse;
        delete this._activeRequests[aPacket.from];
      }
      if (aPacket.type in ThreadStateTypes &&
          aPacket.from in this._threadClients) {
        this._threadClients[aPacket.from]._onThreadState(aPacket);
      }
      this.notify(aPacket.type, aPacket);
      if (onResponse) {
        onResponse(aPacket);
      }
    } catch(ex) {
      dumpn("Error handling response: " + ex + " - stack:\n" + ex.stack);
      Cu.reportError(ex);
    }
    this._sendRequests();
  }
function DC_onPacket ( aPacket ) { if ( ! this . _connected ) { this . _connected = true ; this . notify ( "connected" , aPacket . applicationType , aPacket . traits ) ; return ; } try { if ( ! aPacket . from ) { Cu . reportError ( "Server did not specify an actor, dropping packet: " + JSON . stringify ( aPacket ) ) ; return ; } let onResponse ; if ( aPacket . from in this . _activeRequests && ! ( aPacket . type in UnsolicitedNotifications ) ) { onResponse = this . _activeRequests [ aPacket . from ] . onResponse ; delete this . _activeRequests [ aPacket . from ] ; } if ( aPacket . type in ThreadStateTypes && aPacket . from in this . _threadClients ) { this . _threadClients [ aPacket . from ] . _onThreadState ( aPacket ) ; } this . notify ( aPacket . type , aPacket ) ; if ( onResponse ) { onResponse ( aPacket ) ; } } catch ( ex ) { dumpn ( "Error handling response: " + ex + " - stack:\n" + ex . stack ) ; Cu . reportError ( ex ) ; } this . _sendRequests ( ) ; }
Called by DebuggerTransport to dispatch incoming packets as appropriate.
Called by DebuggerTransport to dispatch incoming packets as appropriate .
// Hello packet. // Don't count unsolicited notifications as responses. // paused/resumed/detached get special treatment...