Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/content/ui/filters-subscriptionactions.js

Issue 5055554716172288: Issue 653 -Object.defineProperty instead of defineGetter / defineSetter (Closed)
Patch Set: I am generally not a big fan of iterating over property names. It seems like for most objects here … Created June 26, 2014, 8:33 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/content/ui/progressBar.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/ui/filters-subscriptionactions.js
===================================================================
--- a/chrome/content/ui/filters-subscriptionactions.js
+++ b/chrome/content/ui/filters-subscriptionactions.js
@@ -231,17 +231,17 @@ var SubscriptionActions =
let result = this._ctrlMask;
try {
let accelKey = Utils.prefService.getIntPref("ui.key.accelKey");
if (accelKey == Ci.nsIDOMKeyEvent.DOM_VK_META)
result = this._metaMask;
else if (accelKey == Ci.nsIDOMKeyEvent.DOM_VK_ALT)
result = this._altMask;
} catch(e) {}
- this.__defineGetter__("_accelMask", function() result);
+ Object.defineProperty(this, "_accelMask", {value: result});
return result;
},
/**
* Called when a key is pressed on the subscription list.
*/
keyPress: function(/**Event*/ event)
{
« no previous file with comments | « no previous file | chrome/content/ui/progressBar.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld