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

Side by Side Diff: lib/filterClasses.js

Issue 29800589: Noissue - Avoid setting ActiveFilter.domainSource (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created June 6, 2018, 12:54 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 * @param {string} [domains] 298 * @param {string} [domains]
299 * Domains that the filter is restricted to separated by domainSeparator 299 * Domains that the filter is restricted to separated by domainSeparator
300 * e.g. "foo.com|bar.com|~baz.com" 300 * e.g. "foo.com|bar.com|~baz.com"
301 * @constructor 301 * @constructor
302 * @augments Filter 302 * @augments Filter
303 */ 303 */
304 function ActiveFilter(text, domains) 304 function ActiveFilter(text, domains)
305 { 305 {
306 Filter.call(this, text); 306 Filter.call(this, text);
307 307
308 this.domainSource = domains; 308 if (domains)
309 this.domainSource = domains;
309 } 310 }
310 exports.ActiveFilter = ActiveFilter; 311 exports.ActiveFilter = ActiveFilter;
311 312
312 ActiveFilter.prototype = extend(Filter, { 313 ActiveFilter.prototype = extend(Filter, {
313 _disabled: false, 314 _disabled: false,
314 _hitCount: 0, 315 _hitCount: 0,
315 _lastHit: 0, 316 _lastHit: 0,
316 317
317 /** 318 /**
318 * Defines whether the filter is disabled 319 * Defines whether the filter is disabled
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 */ 1100 */
1100 function ElemHideEmulationFilter(text, domains, selector) 1101 function ElemHideEmulationFilter(text, domains, selector)
1101 { 1102 {
1102 ElemHideBase.call(this, text, domains, selector); 1103 ElemHideBase.call(this, text, domains, selector);
1103 } 1104 }
1104 exports.ElemHideEmulationFilter = ElemHideEmulationFilter; 1105 exports.ElemHideEmulationFilter = ElemHideEmulationFilter;
1105 1106
1106 ElemHideEmulationFilter.prototype = extend(ElemHideBase, { 1107 ElemHideEmulationFilter.prototype = extend(ElemHideBase, {
1107 type: "elemhideemulation" 1108 type: "elemhideemulation"
1108 }); 1109 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld