B2G/gecko/toolkit/mozapps/update/test/chrome/utils.js
/**
   * Preference observer for the preference specified in |this.observedPref|.
   */
Preference observer for the preference specified in |this.observedPref|.
Preference observer for the preference specified in |this . observedPref| .
function XPI_observe(aSubject, aTopic, aData) {
    if (aData == this.observedPref) {
      let errCount = Services.prefs.getIntPref(this.observedPref);
      let errMax = Services.prefs.getIntPref(this.maxErrorPref);
      if (errCount >= errMax) {
        debugDump("removing pref observer");
        Services.prefs.removeObserver(this.observedPref, this);
      }
      else {
        debugDump("notifying AUS");
        SimpleTest.executeSoon(function() {
          gAUS.notify(null);
        });
      }
    }
  }
function XPI_observe ( aSubject , aTopic , aData ) { if ( aData == this . observedPref ) { let errCount = Services . prefs . getIntPref ( this . observedPref ) ; let errMax = Services . prefs . getIntPref ( this . maxErrorPref ) ; if ( errCount >= errMax ) { debugDump ( "removing pref observer" ) ; Services . prefs . removeObserver ( this . observedPref , this ) ; } else { debugDump ( "notifying AUS" ) ; SimpleTest . executeSoon ( function ( ) { gAUS . notify ( null ) ; } ) ; } } }
Preference observer for the preference specified in |this.observedPref|.
Preference observer for the preference specified in |this . observedPref| .