B2G/gecko/browser/components/downloads/src/DownloadsCommon.jsm
/**
   * Removes an object previously added using addView.
   *
   * @param aView
   *        DownloadsIndicatorView object to be removed.
   */
Removes an object previously added using addView.
@param aView
DownloadsIndicatorView object to be removed.
Removes an object previously added using addView . @param aView DownloadsIndicatorView object to be removed .
function DID_removeView(aView)
  {
    let index = this._views.indexOf(aView);
    if (index != -1) {
      this._views.splice(index, 1);
    }
    if (this._views.length == 0) {
      DownloadsCommon.data.removeView(this);
      this._itemCount = 0;
    }
  }
function DID_removeView ( aView ) { let index = this . _views . indexOf ( aView ) ; if ( index != - 1 ) { this . _views . splice ( index , 1 ) ; } if ( this . _views . length == 0 ) { DownloadsCommon . data . removeView ( this ) ; this . _itemCount = 0 ; } }
Removes an object previously added using addView.
Removes an object previously added using addView .
// Stop receiving events when the last of our views is unregistered.