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

Unified Diff: lib/filterClasses.js

Issue 29790621: Noissue - Delete properties instead of setting to null (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created May 25, 2018, 1:48 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
@@ -456,21 +456,20 @@
if (!domains)
domains = new Map();
domains.set(domain, include);
}
if (domains)
domains.set("", !hasIncludes);
}
-
- this.domainSource = null;
}
Object.defineProperty(this, "domains", {value: domains, enumerable: true});
+ delete this.domainSource;
return this.domains;
},
/**
* Array containing public keys of websites that this filter should apply to
* @type {?string[]}
*/
sitekeys: null,
@@ -706,24 +705,22 @@
// several times on Safari, due to WebKit bug 132872
let prop = Object.getOwnPropertyDescriptor(this, "sitekeys");
if (prop)
return prop.value;
let sitekeys = null;
if (this.sitekeySource)
- {
sitekeys = this.sitekeySource.split("|");
- this.sitekeySource = null;
- }
Object.defineProperty(
this, "sitekeys", {value: sitekeys, enumerable: true}
);
+ delete this.sitekeySource;
return 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld