Bug 718255 - Merge nsIPrefBranch2 with nsIPrefBranch - mop up uses that slipped through; r=mak
--- 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