Bug 718255 - Merge nsIPrefBranch2 with nsIPrefBranch - mop up uses that slipped through; r=mak
authorGeoff Lankow <geoff@darktrojan.net>
Sun, 26 Feb 2012 11:34:25 +1300
changeset 26408 80a19fb501d5e44e0e77a1115e2302fb64c90aa4
parent 26407 bc4fd030119a14a9a95e0eb3c7b5229680106b3b
child 26409 88892c47ccf5cd0845f26db677e4ead7ebbb933f
push id1834
push userclokep@gmail.com
push dateMon, 23 Jan 2017 21:48:40 +0000
treeherdercomm-beta@293cffe83e59 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs718255
Bug 718255 - Merge nsIPrefBranch2 with nsIPrefBranch - mop up uses that slipped through; r=mak
suite/common/places/nsPlacesAutoComplete.js
--- a/suite/common/places/nsPlacesAutoComplete.js
+++ b/suite/common/places/nsPlacesAutoComplete.js
@@ -181,17 +181,17 @@ function fixupSearchText(aURIString)
   return gTextURIService.unEscapeURIForUI("UTF-8", uri);
 }
 
 /**
  * safePrefGetter get the pref with typo safety.
  * This will return the default value provided if no pref is set.
  *
  * @param aPrefBranch
- *        The nsIPrefBranch2 containing the required preference
+ *        The nsIPrefBranch containing the required preference
  * @param aName
  *        A preference name
  * @param aDefault
  *        The preference's default value
  * @return the preference value or provided default
  */
 
 function safePrefGetter(aPrefBranch, aName, aDefault) {
@@ -871,18 +871,17 @@ nsPlacesAutoComplete.prototype = {
     // Validate matchBehavior; default to MATCH_BOUNDARY_ANYWHERE.
     if (this._matchBehavior != MATCH_ANYWHERE &&
         this._matchBehavior != MATCH_BOUNDARY &&
         this._matchBehavior != MATCH_BEGINNING) {
       this._matchBehavior = MATCH_BOUNDARY_ANYWHERE;
     }
     // register observer
     if (aRegisterObserver) {
-      let pb = this._prefs.QueryInterface(Ci.nsIPrefBranch2);
-      pb.addObserver("", this, false);
+      this._prefs.addObserver("", this, false);
     }
   },
 
   /**
    * Given an array of tokens, this function determines which query should be
    * ran.  It also removes any special search tokens.
    *
    * @param aTokens