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

Unified Diff: lib/filterClasses.js

Issue 29799602: Noissue - Avoid setting BlockingFilter instance properties (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Avoid setting csp and rewrite properties as well Created June 5, 2018, 2:20 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterClasses.js
===================================================================
--- a/lib/filterClasses.js
+++ b/lib/filterClasses.js
@@ -901,19 +901,24 @@
* @augments RegExpFilter
*/
function BlockingFilter(text, regexpSource, contentType, matchCase, domains,
thirdParty, sitekeys, collapse, csp, rewrite)
{
RegExpFilter.call(this, text, regexpSource, contentType, matchCase, domains,
thirdParty, sitekeys);
- this.collapse = collapse;
- this.csp = csp;
- this.rewrite = rewrite;
+ if (collapse != null)
+ this.collapse = collapse;
+
+ if (csp != null)
+ this.csp = csp;
+
+ if (rewrite != null)
+ this.rewrite = rewrite;
}
exports.BlockingFilter = BlockingFilter;
BlockingFilter.prototype = extend(RegExpFilter, {
type: "blocking",
/**
* Defines whether the filter should collapse blocked content.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld