B2G/gecko/browser/devtools/tilt/TiltUtils.jsm
/**
   * Gets a custom Tilt preference.
   * If the preference does not exist, undefined is returned. If it does exist,
   * but the type is not correctly specified, null is returned.
   *
   * @param {String} aPref
   *                 the preference name
   * @param {String} aType
   *                 either "boolean", "string" or "integer"
   *
   * @return {Boolean | String | Number} the requested preference
   */
Gets a custom Tilt preference.
If the preference does not exist, undefined is returned. If it does exist,
but the type is not correctly specified, null is returned.



@return {Boolean | String | Number} the requested preference
Gets a custom Tilt preference . If the preference does not exist undefined is returned . If it does exist but the type is not correctly specified null is returned . @return { Boolean | String | Number } the requested preference
function TUP_get(aPref, aType)
  {
    if (!aPref || !aType) {
      return;
    }
    try {
      let prefs = this._branch;
      switch(aType) {
        case "boolean":
          return prefs.getBoolPref(aPref);
        case "string":
          return prefs.getCharPref(aPref);
        case "integer":
          return prefs.getIntPref(aPref);
      }
      return null;
    } catch(e) {
      TiltUtils.Output.error(e.message);
      return undefined;
    }
  }
function TUP_get ( aPref , aType ) { if ( ! aPref || ! aType ) { return ; } try { let prefs = this . _branch ; switch ( aType ) { case "boolean" : return prefs . getBoolPref ( aPref ) ; case "string" : return prefs . getCharPref ( aPref ) ; case "integer" : return prefs . getIntPref ( aPref ) ; } return null ; } catch ( e ) { TiltUtils . Output . error ( e . message ) ; return undefined ; } }
Gets a custom Tilt preference.
Gets a custom Tilt preference .
// handle any unexpected exceptions