function DC_close(aOnClosed) {
    // Disable detach event notifications, because event handlers will be in a
    // cleared scope by the time they run.
    this._eventsEnabled = false;

    if (aOnClosed) {
      this.addOneTimeListener('closed', function(aEvent) {
        aOnClosed();
      });
    }

    let closeTransport = function _closeTransport() {
      this._transport.close();
      this._transport = null;
    }.bind(this);

    let detachTab = function _detachTab() {
      if (this.activeTab) {
        this.activeTab.detach(closeTransport);
      } else {
        closeTransport();
      }
    }.bind(this);

    if (this.activeThread) {
      this.activeThread.detach(detachTab);
    } else {
      detachTab();
    }
  }
/**
   * Shut down communication with the debugging server.
   *
   * @param aOnClosed function
   *        If specified, will be called when the debugging connection
   *        has been closed.
   */
Shut down communication with the debugging server.
@param aOnClosed function
If specified, will be called when the debugging connection
has been closed.
Shut down communication with the debugging server . @param aOnClosed function If specified will be called when the debugging connection has been closed .
function DC_close(aOnClosed) {
    this._eventsEnabled = false;
    if (aOnClosed) {
      this.addOneTimeListener('closed', function(aEvent) {
        aOnClosed();
      });
    }
    let closeTransport = function _closeTransport() {
      this._transport.close();
      this._transport = null;
    }.bind(this);
    let detachTab = function _detachTab() {
      if (this.activeTab) {
        this.activeTab.detach(closeTransport);
      } else {
        closeTransport();
      }
    }.bind(this);
    if (this.activeThread) {
      this.activeThread.detach(detachTab);
    } else {
      detachTab();
    }
  }
function DC_close ( aOnClosed ) { this . _eventsEnabled = false ; if ( aOnClosed ) { this . addOneTimeListener ( 'closed' , function ( aEvent ) { aOnClosed ( ) ; } ) ; } let closeTransport = function _closeTransport ( ) { this . _transport . close ( ) ; this . _transport = null ; } . bind ( this ) ; let detachTab = function _detachTab ( ) { if ( this . activeTab ) { this . activeTab . detach ( closeTransport ) ; } else { closeTransport ( ) ; } } . bind ( this ) ; if ( this . activeThread ) { this . activeThread . detach ( detachTab ) ; } else { detachTab ( ) ; } }
Shut down communication with the debugging server.
Shut down communication with the debugging server .
// Disable detach event notifications, because event handlers will be in a // cleared scope by the time they run.