mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-27 10:52:26 +01:00
Use Object.defineProperty instead of __defineGetter__/__defineSetter__
In Firefox 48+, the __defineSetter__/__defineSetter__ is deprecated, so use Object.defineProperty instead.
This commit is contained in:
@@ -69,10 +69,13 @@ function privateBrowsing(controller) {
|
||||
this._pbMenuItem = new elementslib.Elem(this._controller.menus['tools-menu'].privateBrowsingItem);
|
||||
this._pbTransitionItem = new elementslib.ID(this._controller.window.document, "Tools:PrivateBrowsing");
|
||||
|
||||
this.__defineGetter__('_pbs', function() {
|
||||
delete this._pbs;
|
||||
return this._pbs = Cc["@mozilla.org/privatebrowsing;1"].
|
||||
getService(Ci.nsIPrivateBrowsingService);
|
||||
Object.defineProperty(this, '_pbs', {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
get() {
|
||||
return Cc["@mozilla.org/privatebrowsing;1"].
|
||||
getService(Ci.nsIPrivateBrowsingService);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user