Index: lib/utils.js |
=================================================================== |
--- a/lib/utils.js |
+++ b/lib/utils.js |
@@ -50,17 +50,17 @@ let Utils = exports.Utils = |
/** |
* Returns whether we are running in Fennec, for Fennec-specific hacks |
* @type Boolean |
*/ |
get isFennec() |
{ |
let {application} = require("info"); |
let result = (application == "fennec" || application == "fennec2"); |
- Utils.__defineGetter__("isFennec", () => result); |
+ Object.defineProperty(Utils, "isFennec", {value: result}); |
Wladimir Palant
2014/06/23 11:12:41
Use this rather than Utils here? Same goes for the
|
return result; |
}, |
/** |
* Returns the user interface locale selected for adblockplus chrome package. |
*/ |
get appLocale() |
{ |
@@ -68,28 +68,28 @@ let Utils = exports.Utils = |
try |
{ |
locale = Utils.chromeRegistry.getSelectedLocale("adblockplus"); |
} |
catch (e) |
{ |
Cu.reportError(e); |
} |
- Utils.__defineGetter__("appLocale", () => locale); |
- return Utils.appLocale; |
+ Object.defineProperty(Utils, "appLocale", {value: locale}); |
+ return locale; |
}, |
/** |
* Returns version of the Gecko platform |
*/ |
get platformVersion() |
{ |
let platformVersion = Services.appinfo.platformVersion; |
- Utils.__defineGetter__("platformVersion", () => platformVersion); |
- return Utils.platformVersion; |
+ Object.defineProperty(Utils, "platformVersion", {value: platformVersion}); |
+ return platformVersion; |
}, |
/** |
* Retrieves a string from global.properties string bundle, will throw if string isn't found. |
* |
* @param {String} name string name |
* @return {String} |
*/ |