Bug 1030420 - QI the pref service to the appropriate interface. r=billm
authorBobby Holley <bobbyholley@gmail.com>
Wed, 24 Sep 2014 09:17:34 +0200
changeset 206884 0c28d9772cd219c334bc7c49b870c3893bea7a1a
parent 206883 8d16fdda5b35bb315d3b614656bc615b6cb242a0
child 206885 b419fc2a66bc15c994fdfd120b70e06affc4bcc4
push id49538
push userbobbyholley@gmail.com
push dateWed, 24 Sep 2014 07:17:45 +0000
treeherdermozilla-inbound@35dcddea2c7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1030420
milestone35.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 1030420 - QI the pref service to the appropriate interface. r=billm nsIPrefService and nsIPrefBranch are implemented by the same XPCOM object, but getBranch lives on nsIPrefService rather than nsIPrefBranch. The bug here is only noticeable if nobody has already QIed the per-scope-singleton object to nsIPrefService. If we create two scopes where there previously was one, that's more likely to be the case, and manifest itself as the bc1 orange we see on TBPL.
browser/base/content/test/general/browser_bug409624.js
--- a/browser/base/content/test/general/browser_bug409624.js
+++ b/browser/base/content/test/general/browser_bug409624.js
@@ -16,17 +16,17 @@ function test() {
                        },
                        handleCompletion: function (reason) { if (!reason) test2(); },
                      });
 }
 
 function test2()
 {
   let prefService = Cc["@mozilla.org/preferences-service;1"]
-                    .getService(Components.interfaces.nsIPrefBranch2);
+                    .getService(Components.interfaces.nsIPrefService);
 
   let findBar = gFindBar;
   let textbox = gFindBar.getElement("findbar-textbox");
 
   let tempScope = {};
   Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader)
                                              .loadSubScript("chrome://browser/content/sanitize.js", tempScope);
   let Sanitizer = tempScope.Sanitizer;