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

Side by Side Diff: lib/filterClasses.js

Issue 29354328: Noissue - Handle filters with only empty domains (Closed)
Patch Set: Created Sept. 20, 2016, 1:14 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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 { 402 {
403 include = true; 403 include = true;
404 hasIncludes = true; 404 hasIncludes = true;
405 } 405 }
406 406
407 if (!domains) 407 if (!domains)
408 domains = Object.create(null); 408 domains = Object.create(null);
409 409
410 domains[domain] = include; 410 domains[domain] = include;
411 } 411 }
412 domains[""] = !hasIncludes; 412 if (domains)
413 domains[""] = !hasIncludes;
413 } 414 }
414 415
415 this.domainSource = null; 416 this.domainSource = null;
416 } 417 }
417 418
418 Object.defineProperty(this, "domains", {value: domains, enumerable: true}); 419 Object.defineProperty(this, "domains", {value: domains, enumerable: true});
419 return this.domains; 420 return this.domains;
420 }, 421 },
421 422
422 /** 423 /**
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 // several times on Safari, due to WebKit bug 132872 1033 // several times on Safari, due to WebKit bug 132872
1033 let prop = Object.getOwnPropertyDescriptor(this, "regexpString"); 1034 let prop = Object.getOwnPropertyDescriptor(this, "regexpString");
1034 if (prop) 1035 if (prop)
1035 return prop.value; 1036 return prop.value;
1036 1037
1037 let regexp = Filter.toRegExp(this.regexpSource); 1038 let regexp = Filter.toRegExp(this.regexpSource);
1038 Object.defineProperty(this, "regexpString", {value: regexp}); 1039 Object.defineProperty(this, "regexpString", {value: regexp});
1039 return regexp; 1040 return regexp;
1040 } 1041 }
1041 }); 1042 });
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