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

Delta Between Two Patch Sets: lib/matcher.js

Issue 30018555: Issue 7311 - Split _checkEntryMatchByDomain() (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Left Patch Set: Created Feb. 26, 2019, 9:29 a.m.
Right Patch Set: Avoid unnecessary call Created Feb. 26, 2019, 10:12 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 let filters = filtersByDomain.get(suffix); 448 let filters = filtersByDomain.get(suffix);
449 if (filters) 449 if (filters)
450 { 450 {
451 for (let [filter, include] of filters.entries()) 451 for (let [filter, include] of filters.entries())
452 { 452 {
453 if (!include) 453 if (!include)
454 { 454 {
455 excluded.add(filter); 455 excluded.add(filter);
456 } 456 }
457 else if ((excluded.size == 0 || !excluded.has(filter)) && 457 else if ((excluded.size == 0 || !excluded.has(filter)) &&
458 this._matchFilterWithoutDomain(filter, location, typeMask, 458 filter.matchesWithoutDomain(location, typeMask, thirdParty,
459 thirdParty, sitekey, 459 sitekey, collection))
460 collection))
461 { 460 {
462 return filter; 461 return filter;
463 } 462 }
464 } 463 }
465 } 464 }
466 } 465 }
467 466
468 return null; 467 return null;
469 } 468 }
470 469
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 890
892 exports.CombinedMatcher = CombinedMatcher; 891 exports.CombinedMatcher = CombinedMatcher;
893 892
894 /** 893 /**
895 * Shared {@link CombinedMatcher} instance that should usually be used. 894 * Shared {@link CombinedMatcher} instance that should usually be used.
896 * @type {CombinedMatcher} 895 * @type {CombinedMatcher}
897 */ 896 */
898 let defaultMatcher = new CombinedMatcher(); 897 let defaultMatcher = new CombinedMatcher();
899 898
900 exports.defaultMatcher = defaultMatcher; 899 exports.defaultMatcher = defaultMatcher;
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld