B2G/gecko/browser/components/tabview/modules/utils.jsm
// Removes the subscriber associated with the event for the given callback.
Removes the subscriber associated with the event for the given callback.
Removes the subscriber associated with the event for the given callback .
function Subscribable_removeSubscriber(eventName, callback) {
    try {
      Utils.assertThrow(typeof callback == "function", "callback must be a function");
      Utils.assertThrow(eventName && typeof eventName == "string",
          "eventName must be a non-empty string");
    } catch(e) {
      Utils.log(e);
      return;
    }
    if (!this.subscribers || !this.subscribers[eventName])
      return;
    let subscribers = this.subscribers[eventName];
    let index = subscribers.indexOf(callback);
    if (index > -1)
      subscribers.splice(index, 1);
  }
function Subscribable_removeSubscriber ( eventName , callback ) { try { Utils . assertThrow ( typeof callback == "function" , "callback must be a function" ) ; Utils . assertThrow ( eventName && typeof eventName == "string" , "eventName must be a non-empty string" ) ; } catch ( e ) { Utils . log ( e ) ; return ; } if ( ! this . subscribers || ! this . subscribers [ eventName ] ) return ; let subscribers = this . subscribers [ eventName ] ; let index = subscribers . indexOf ( callback ) ; if ( index > - 1 ) subscribers . splice ( index , 1 ) ; }
Removes the subscriber associated with the event for the given callback.
Removes the subscriber associated with the event for the given callback .