utilityOverlay: restore getBoolPref for compatibility

This commit is contained in:
Roy Tam 2019-03-30 06:49:19 +08:00
commit caab96c969
2 changed files with 20 additions and 0 deletions

View file

@ -60,6 +60,16 @@ function openTopWin(url) {
openUILinkIn(url, "current");
}
function getBoolPref(prefname, def)
{
try {
return Services.prefs.getBoolPref(prefname);
}
catch(er) {
return def;
}
}
/* openUILink handles clicks on UI elements that cause URLs to load.
*
* As the third argument, you may pass an object with the same properties as

View file

@ -75,6 +75,16 @@ function openTopWin(url) {
openUILinkIn(url, "current");
}
function getBoolPref(prefname, def)
{
try {
return Services.prefs.getBoolPref(prefname);
}
catch(er) {
return def;
}
}
/* openUILink handles clicks on UI elements that cause URLs to load.
*
* As the third argument, you may pass an object with the same properties as