B2G/gecko/toolkit/mozapps/extensions/XPIProvider.jsm
/**
   * Notify listeners that the download failed.
   *
   * @param  aReason
   *         Something to log about the failure
   * @param  error
   *         The error code to pass to the listeners
   */
Notify listeners that the download failed.
@param  aReason
Something to log about the failure
@param  error
The error code to pass to the listeners
Notify listeners that the download failed . @param aReason Something to log about the failure @param error The error code to pass to the listeners
function AI_downloadFailed(aReason, aError) {
    WARN("Download failed", aError);
    this.state = AddonManager.STATE_DOWNLOAD_FAILED;
    this.error = aReason;
    XPIProvider.removeActiveInstall(this);
    AddonManagerPrivate.callInstallListeners("onDownloadFailed", this.listeners,
                                             this.wrapper);
    if (this.state == AddonManager.STATE_DOWNLOAD_FAILED)
      this.removeTemporaryFile();
  }
function AI_downloadFailed ( aReason , aError ) { WARN ( "Download failed" , aError ) ; this . state = AddonManager . STATE_DOWNLOAD_FAILED ; this . error = aReason ; XPIProvider . removeActiveInstall ( this ) ; AddonManagerPrivate . callInstallListeners ( "onDownloadFailed" , this . listeners , this . wrapper ) ; if ( this . state == AddonManager . STATE_DOWNLOAD_FAILED ) this . removeTemporaryFile ( ) ; }
Notify listeners that the download failed.
Notify listeners that the download failed .
// If the listener hasn't restarted the download then remove any temporary // file