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

Unified Diff: lib/filterListener.js

Issue 29870577: Issue 6916 - Encapsulate filter subscriptions (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Add subscriptionCount property Created Sept. 1, 2018, 2:16 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/filterStorage.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterListener.js
===================================================================
--- a/lib/filterListener.js
+++ b/lib/filterListener.js
@@ -138,17 +138,17 @@
*/
function addFilter(filter)
{
if (!(filter instanceof ActiveFilter) || filter.disabled)
return;
let hasEnabled = false;
let allowSnippets = false;
- for (let subscription of filter.subscriptions)
+ for (let subscription of filter.subscriptions())
{
if (!subscription.disabled)
{
hasEnabled = true;
// Allow snippets to be executed only by the circumvention lists or the
// user's own filters.
if (subscription.type == "circumvention" ||
@@ -185,17 +185,17 @@
function removeFilter(filter)
{
if (!(filter instanceof ActiveFilter))
return;
if (!filter.disabled)
{
let hasEnabled = false;
- for (let subscription of filter.subscriptions)
+ for (let subscription of filter.subscriptions())
{
if (!subscription.disabled)
{
hasEnabled = true;
break;
}
}
if (hasEnabled)
« no previous file with comments | « lib/filterClasses.js ('k') | lib/filterStorage.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld