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

Unified Diff: lib/filterStorage.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 | « lib/filterClasses.js ('k') | lib/io.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterStorage.js
===================================================================
--- a/lib/filterStorage.js
+++ b/lib/filterStorage.js
@@ -80,18 +80,18 @@ let FilterStorage = exports.FilterStorag
if (file)
file.append("patterns.ini");
} catch(e) {}
}
if (!file)
Cu.reportError("Adblock Plus: Failed to resolve filter file location from extensions.adblockplus.patternsfile preference");
- this.__defineGetter__("sourceFile", () => file);
- return this.sourceFile;
+ Object.defineProperty(this, "sourceFile", {value: file});
+ return file;
},
/**
* Will be set to true if no patterns.ini file exists.
* @type Boolean
*/
firstRun: false,
« no previous file with comments | « lib/filterClasses.js ('k') | lib/io.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld