B2G/gecko/toolkit/mozapps/extensions/AddonManager.jsm
/**
   * Calls a method on all registered providers if it exists and consumes any
   * thrown exception. Return values are ignored. Any parameters after the
   * method parameter are passed to the provider's method.
   *
   * @param  aMethod
   *         The method name to call
   * @see    callProvider
   */
Calls a method on all registered providers if it exists and consumes any
thrown exception. Return values are ignored. Any parameters after the
method parameter are passed to the provider's method.

@param  aMethod
The method name to call
@see    callProvider
Calls a method on all registered providers if it exists and consumes any thrown exception . Return values are ignored . Any parameters after the method parameter are passed to the provider ' s method . @param aMethod The method name to call @see callProvider
function AMI_callProviders(aMethod, ...aArgs) {
    if (!aMethod || typeof aMethod != "string")
      throw Components.Exception("aMethod must be a non-empty string",
                                 Cr.NS_ERROR_INVALID_ARG);
    let providers = this.providers.slice(0);
    for (let provider of providers) {
      try {
        if (aMethod in provider)
          provider[aMethod].apply(provider, aArgs);
      }
      catch (e) {
        ERROR("Exception calling provider " + aMethod, e);
      }
    }
  }
function AMI_callProviders ( aMethod , ... aArgs ) { if ( ! aMethod || typeof aMethod != "string" ) throw Components . Exception ( "aMethod must be a non-empty string" , Cr . NS_ERROR_INVALID_ARG ) ; let providers = this . providers . slice ( 0 ) ; for ( let provider of providers ) { try { if ( aMethod in provider ) provider [ aMethod ] . apply ( provider , aArgs ) ; } catch ( e ) { ERROR ( "Exception calling provider " + aMethod , e ) ; } } }
Calls a method on all registered providers if it exists and consumes any
 thrown exception.
Calls a method on all registered providers if it exists and consumes any thrown exception .