function DSC_onPacket(aPacket) {
    let actor = this.getActor(aPacket.to);
    if (!actor) {
      this.transport.send({ from: aPacket.to ? aPacket.to : "root",
                            error: "noSuchActor" });
      return;
    }

    var ret = null;

    // Dispatch the request to the actor.
    if (actor.requestTypes && actor.requestTypes[aPacket.type]) {
      try {
        ret = actor.requestTypes[aPacket.type].bind(actor)(aPacket);
      } catch(e) {
        Cu.reportError(e);
        ret = { error: "unknownError",
                message: ("error occurred while processing '" + aPacket.type +
                          "' request: " + safeErrorString(e)) };
      }
    } else {
      ret = { error: "unrecognizedPacketType",
              message: ('Actor "' + actor.actorID +
                        '" does not recognize the packet type "' +
                        aPacket.type + '"') };
    }

    if (!ret) {
      // XXX: The actor wasn't ready to reply yet, don't process new
      // requests until it does.
      return;
    }

    if (!ret.from) {
      ret.from = aPacket.to;
    }

    this.transport.send(ret);
  }
/**
   * 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 DSC_onPacket(aPacket) {
    let actor = this.getActor(aPacket.to);
    if (!actor) {
      this.transport.send({ from: aPacket.to ? aPacket.to : "root",
                            error: "noSuchActor" });
      return;
    }
    var ret = null;
    if (actor.requestTypes && actor.requestTypes[aPacket.type]) {
      try {
        ret = actor.requestTypes[aPacket.type].bind(actor)(aPacket);
      } catch(e) {
        Cu.reportError(e);
        ret = { error: "unknownError",
                message: ("error occurred while processing '" + aPacket.type +
                          "' request: " + safeErrorString(e)) };
      }
    } else {
      ret = { error: "unrecognizedPacketType",
              message: ('Actor "' + actor.actorID +
                        '" does not recognize the packet type "' +
                        aPacket.type + '"') };
    }
    if (!ret) {
      return;
    }
    if (!ret.from) {
      ret.from = aPacket.to;
    }
    this.transport.send(ret);
  }
function DSC_onPacket ( aPacket ) { let actor = this . getActor ( aPacket . to ) ; if ( ! actor ) { this . transport . send ( { from : aPacket . to ? aPacket . to : "root" , error : "noSuchActor" } ) ; return ; } var ret = null ; if ( actor . requestTypes && actor . requestTypes [ aPacket . type ] ) { try { ret = actor . requestTypes [ aPacket . type ] . bind ( actor ) ( aPacket ) ; } catch ( e ) { Cu . reportError ( e ) ; ret = { error : "unknownError" , message : ( "error occurred while processing '" + aPacket . type + "' request: " + safeErrorString ( e ) ) } ; } } else { ret = { error : "unrecognizedPacketType" , message : ( 'Actor "' + actor . actorID + '" does not recognize the packet type "' + aPacket . type + '"' ) } ; } if ( ! ret ) { return ; } if ( ! ret . from ) { ret . from = aPacket . to ; } this . transport . send ( ret ) ; }
Called by DebuggerTransport to dispatch incoming packets as appropriate.
Called by DebuggerTransport to dispatch incoming packets as appropriate .
// Dispatch the request to the actor. // XXX: The actor wasn't ready to reply yet, don't process new // requests until it does.