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

This commit is contained in:
gavin%gavinsharp.com 2006-12-02 22:27:06 +00:00
Родитель 03165a3ac3
Коммит f72d2b7f36
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -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);
},