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

Unified Diff: lib/filterClasses.js

Issue 29800592: Noissue - Remove workaround for WebKit getter misoptimization (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created June 6, 2018, 2:03 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
@@ -394,22 +394,16 @@
/**
* Map containing domains that this filter should match on/not match
* on or null if the filter should match on all domains
* @type {?Map.<string,boolean>}
*/
get domains()
{
- // Despite this property being cached, the getter is called
- // several times on Safari, due to WebKit bug 132872
- let prop = Object.getOwnPropertyDescriptor(this, "domains");
- if (prop)
- return prop.value;
-
let domains = null;
if (this.domainSource)
{
let source = this.domainSource;
if (!this.domainSourceIsUpperCase)
{
// RegExpFilter already have uppercase domains
@@ -640,22 +634,16 @@
*/
regexpSource: null,
/**
* Regular expression to be used when testing against this filter
* @type {RegExp}
*/
get regexp()
{
- // Despite this property being cached, the getter is called
- // several times on Safari, due to WebKit bug 132872
- let prop = Object.getOwnPropertyDescriptor(this, "regexp");
- if (prop)
- return prop.value;
-
let source = Filter.toRegExp(this.regexpSource);
let regexp = new RegExp(source, this.matchCase ? "" : "i");
Object.defineProperty(this, "regexp", {value: regexp});
this.regexpSource = null;
return regexp;
},
/**
* Content types the filter applies to, combination of values from
@@ -682,22 +670,16 @@
*/
sitekeySource: null,
/**
* @see ActiveFilter.sitekeys
*/
get sitekeys()
{
- // Despite this property being cached, the getter is called
- // 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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld