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

Unified Diff: lib/filterClasses.js

Issue 6055266931965952: Issue 1273 - Worked around WebKit getter misoptimization on Safari 8 (Closed)
Patch Set: Fixed typo in comment Created Aug. 27, 2014, 12:59 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 | « lib/elemHide.js ('k') | 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
@@ -324,6 +324,12 @@
*/
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)
@@ -514,6 +520,12 @@
*/
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;
+
// Remove multiple wildcards
let source = this.regexpSource
.replace(/\*+/g, "*") // remove multiple wildcards
« no previous file with comments | « lib/elemHide.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld