mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 791944 - Use Object.defineProperty() instead of __defineGetter__ in XPCOMUtils.defineLazyGetter(). r=mak77
This commit is contained in:
parent
02dc2fbc6f
commit
b810714776
@ -171,9 +171,13 @@ var XPCOMUtils = {
|
||||
*/
|
||||
defineLazyGetter: function XPCU_defineLazyGetter(aObject, aName, aLambda)
|
||||
{
|
||||
aObject.__defineGetter__(aName, function() {
|
||||
delete aObject[aName];
|
||||
return aObject[aName] = aLambda.apply(aObject);
|
||||
Object.defineProperty(aObject, aName, {
|
||||
get: function () {
|
||||
delete aObject[aName];
|
||||
return aObject[aName] = aLambda.apply(aObject);
|
||||
},
|
||||
configurable: true,
|
||||
enumerable: true
|
||||
});
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user