 Issue 29907586:
  Issue 6994 - Use shortcut matching for location only filters  (Closed)
    
  
    Issue 29907586:
  Issue 6994 - Use shortcut matching for location only filters  (Closed) 
  | Index: lib/filterClasses.js | 
| =================================================================== | 
| --- a/lib/filterClasses.js | 
| +++ b/lib/filterClasses.js | 
| @@ -803,16 +803,26 @@ | 
| Object.defineProperty( | 
| this, "sitekeys", {value: sitekeys, enumerable: true} | 
| ); | 
| return this.sitekeys; | 
| }, | 
| /** | 
| + * Tests whether the filter only has a location. | 
| + * @return {boolean} | 
| + */ | 
| + isLocationOnly() | 
| + { | 
| + return this.contentType == RegExpFilter.prototype.contentType && | 
| 
Manish Jethani
2018/10/24 21:35:28
I haven't run this code, but I'm pretty sure that
 
Jon Sonesen
2018/10/24 21:46:51
Ah, I see what you mean there. I didn't look deep
 | 
| + this.thirdParty == null && !this.domains && !this.sitekeys; | 
| + }, | 
| + | 
| + /** | 
| * Tests whether the URL matches this filter | 
| * @param {string} location URL to be tested | 
| * @param {number} typeMask bitmask of content / request types to match | 
| * @param {string} [docDomain] domain name of the document that loads the URL | 
| * @param {boolean} [thirdParty] should be true if the URL is a third-party | 
| * request | 
| * @param {string} [sitekey] public key provided by the document | 
| * @return {boolean} true in case of a match |