B2G/gecko/services/aitc/modules/manager.js
/**
   * Go through list of apps to PUT and attempt each one. If we fail, try
   * again in PUT_FREQ. Will throw if called with an empty, _reschedule()
   * makes sure that we don't.
   */
Go through list of apps to PUT and attempt each one. If we fail, try
again in PUT_FREQ. Will throw if called with an empty, _reschedule()
makes sure that we don't.
Go through list of apps to PUT and attempt each one . If we fail try again in PUT_FREQ . Will throw if called with an empty _reschedule () makes sure that we don ' t .
function _processQueue() {
    if (!this._client) {
      throw new Error("_processQueue called without a client");
    }
    if (!this._pending.length) {
      throw new Error("_processQueue called with an empty queue");
    }
    if (this._putInProgress) {
      return;
    }
    let self = this;
    this._validateToken(function validation(err) {
      if (err) {
        self._log.error(err);
      } else {
        self._putApps();
      }
    });
  }
function _processQueue ( ) { if ( ! this . _client ) { throw new Error ( "_processQueue called without a client" ) ; } if ( ! this . _pending . length ) { throw new Error ( "_processQueue called with an empty queue" ) ; } if ( this . _putInProgress ) { return ; } let self = this ; this . _validateToken ( function validation ( err ) { if ( err ) { self . _log . error ( err ) ; } else { self . _putApps ( ) ; } } ) ; }
Go through list of apps to PUT and attempt each one.
Go through list of apps to PUT and attempt each one .
// The network request sent out as a result to the last call to // _processQueue still isn't done. A timer is created they all // finish to make sure this function is called again if neccessary.