зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
03165a3ac3
Коммит
f72d2b7f36
|
@ -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);
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче