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 87732 a8a1e874238a6dfdbf306b92187cb8dfcc766c21
parent 87731 f65247c7647a530499b9c8331c2284ed556227cf
child 87733 11fe119b6075589db5aa9afbee76c8673c1c7af6
push id6484
push usergeoff@darktrojan.net
push dateSat, 25 Feb 2012 22:34:45 +0000
treeherdermozilla-inbound@a8a1e874238a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs718255
milestone13.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 718255 - Merge nsIPrefBranch2 with nsIPrefBranch - mop up uses that slipped through; r=mak
content/events/test/test_bug574663.html
toolkit/components/places/nsPlacesAutoComplete.js
--- a/content/events/test/test_bug574663.html
+++ b/content/events/test/test_bug574663.html
@@ -99,30 +99,30 @@ function runTest() {
     nextTest();
   }, win);
 }
 
 function initPrefs()
 {
   netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
   var prefSvc = Components.classes["@mozilla.org/preferences-service;1"].
-                  getService(Components.interfaces.nsIPrefBranch2);
+                  getService(Components.interfaces.nsIPrefBranch);
   prefSvc.setBoolPref("general.smoothScroll", false);
   // Disables the app level scroll acceleration
   prefSvc.setIntPref("mousewheel.acceleration.start", -1);
   prefSvc.setBoolPref("mousewheel.system_scroll_override_on_root_content.enabled", false);
   // Enable zooming for ctrl-scrolling
   prefSvc.setIntPref("mousewheel.withcontrolkey.action", 3);
 }
 
 function clearPrefs()
 {
   netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
   var prefSvc = Components.classes["@mozilla.org/preferences-service;1"].
-                  getService(Components.interfaces.nsIPrefBranch2);
+                  getService(Components.interfaces.nsIPrefBranch);
 
   prefSvc.clearUserPref("general.smoothScroll");
   prefSvc.clearUserPref("mousewheel.acceleration.start");
   prefSvc.clearUserPref("mousewheel.system_scroll_override_on_root_content.enabled");
   prefSvc.clearUserPref("mousewheel.withcontrolkey.action");
 }
 
 window.onload = function () {
--- a/toolkit/components/places/nsPlacesAutoComplete.js
+++ b/toolkit/components/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