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

Unified Diff: lib/whitelisting.js

Issue 29867599: Issue 6889 - Upgrade adblockpluscore to 9ebb3381fcde and integrate the changes. (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: merge issue 6897 into this Created Aug. 28, 2018, 4:23 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/utils.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/whitelisting.js
===================================================================
--- a/lib/whitelisting.js
+++ b/lib/whitelisting.js
@@ -88,17 +88,17 @@
return !!checkWhitelisted(new ext.Page(message.tab));
});
port.on("filters.whitelist", message =>
{
let page = new ext.Page(message.tab);
let host = page.url.hostname.replace(/^www\./, "");
let filter = Filter.fromText("@@||" + host + "^$document");
- if (filter.subscriptions.length && filter.disabled)
+ if (filter.subscriptions.size && filter.disabled)
{
filter.disabled = false;
}
else
{
filter.disabled = false;
FilterStorage.addFilter(filter);
}
@@ -107,17 +107,17 @@
port.on("filters.unwhitelist", message =>
{
let page = new ext.Page(message.tab);
// Remove any exception rules applying to this URL
let filter = checkWhitelisted(page);
while (filter)
{
FilterStorage.removeFilter(filter);
- if (filter.subscriptions.length)
+ if (filter.subscriptions.size)
filter.disabled = true;
filter = checkWhitelisted(page);
}
});
function revalidateWhitelistingState(page)
{
FilterNotifier.emit(
« no previous file with comments | « lib/utils.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld