Bug 362286: nsIPrefBranchInternal is deprecated - use nsIPrefBranch2, patch by Shawn Wilsher :sdwilsh <comrade693+bmo@gmail.com>, r=db48x, sr=neil

git-svn-id: svn://10.0.0.236/trunk@216345 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
gavin%gavinsharp.com 2006-12-02 22:27:06 +00:00
parent 0c97f872d5
commit c7050a4e14

View File

@ -61,20 +61,20 @@ var PrefUtils =
this.mPrefs = prefService.getBranch(null);
},
addObserver: function(aDomain, aFunction)
addObserver: function addObserver(aDomain, aFunction)
{
if (!this.mPrefs) this.init();
var pbi = XPCU.QI(this.mPrefs, "nsIPrefBranchInternal");
var pbi = XPCU.QI(this.mPrefs, "nsIPrefBranch2");
if (pbi)
pbi.addObserver(aDomain, aFunction, false);
},
removeObserver: function(aDomain, aFunction)
removeObserver: function removeObserver(aDomain, aFunction)
{
if (!this.mPrefs) this.init();
var pbi = XPCU.QI(this.mPrefs, "nsIPrefBranchInternal");
var pbi = XPCU.QI(this.mPrefs, "nsIPrefBranch2");
if (pbi)
pbi.removeObserver(aDomain, aFunction);
},