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

Unified Diff: lib/subscriptionClasses.js

Issue 29573895: Issue 5160 - Alias new class names and properties. (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created Oct. 11, 2017, 7:38 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
Index: lib/subscriptionClasses.js
===================================================================
--- a/lib/subscriptionClasses.js
+++ b/lib/subscriptionClasses.js
@@ -12,17 +12,17 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
"use strict";
-const {Subscription, SpecialSubscription, DownloadableSubscription} =
+const {Subscription, UserDefinedSubscription, DownloadableSubscription} =
require("compiled");
/**
* This property allows iterating over the list of filters. It will delete
* references automatically at the end of the current loop iteration. If you
* need persistent references or element access by position you should use
* Subscription.filterAt() instead.
* @type {Iterable}
@@ -46,11 +46,45 @@
filter.delete();
}
}
}.bind(this)
};
}
});
+Object.defineProperty(DownloadableSubscription.prototype, "expires", {
+ get()
hub 2017/10/11 19:42:02 I chose to make the aliases non enumerable.
+ {
+ return this.hardExpiration;
+ },
+ set(value)
+ {
+ this.hardExpiration = value;
+ }
+});
+
+Object.defineProperty(DownloadableSubscription.prototype, "errors", {
+ get()
+ {
+ return this.errorCount;
+ },
+ set(value)
+ {
+ this.errorCount = value;
+ }
+});
+
+Object.defineProperty(DownloadableSubscription.prototype, "version", {
+ get()
+ {
+ return this.dataRevision;
+ },
+ set(value)
+ {
+ this.dataRevision = value;
+ }
+});
+
exports.Subscription = Subscription;
-exports.SpecialSubscription = SpecialSubscription;
+exports.UserDefinedSubscription = UserDefinedSubscription;
+exports.SpecialSubscription = UserDefinedSubscription;
exports.DownloadableSubscription = DownloadableSubscription;

Powered by Google App Engine
This is Rietveld