B2G/gecko/browser/devtools/tilt/TiltUtils.jsm
/**
   * Sets a custom Tilt preference.
   * If the preference already exists, it is overwritten.
   *
   * @param {String} aPref
   *                 the preference name
   * @param {String} aType
   *                 either "boolean", "string" or "integer"
   * @param {String} aValue
   *                 a new preference value
   *
   * @return {Boolean} true if the preference was set successfully
   */
Sets a custom Tilt preference.
If the preference already exists, it is overwritten.



@return {Boolean} true if the preference was set successfully
Sets a custom Tilt preference . If the preference already exists it is overwritten . @return { Boolean } true if the preference was set successfully
function TUP_set(aPref, aType, aValue)
  {
    if (!aPref || !aType || aValue === undefined || aValue === null) {
      return;
    }
    try {
      let prefs = this._branch;
      switch(aType) {
        case "boolean":
          return prefs.setBoolPref(aPref, aValue);
        case "string":
          return prefs.setCharPref(aPref, aValue);
        case "integer":
          return prefs.setIntPref(aPref, aValue);
      }
    } catch(e) {
      TiltUtils.Output.error(e.message);
    }
    return false;
  }
function TUP_set ( aPref , aType , aValue ) { if ( ! aPref || ! aType || aValue === undefined || aValue === null ) { return ; } try { let prefs = this . _branch ; switch ( aType ) { case "boolean" : return prefs . setBoolPref ( aPref , aValue ) ; case "string" : return prefs . setCharPref ( aPref , aValue ) ; case "integer" : return prefs . setIntPref ( aPref , aValue ) ; } } catch ( e ) { TiltUtils . Output . error ( e . message ) ; } return false ; }
Sets a custom Tilt preference.
Sets a custom Tilt preference .
// handle any unexpected exceptions