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

Issue 6589722470121472: Issue 419 - Work around WebKit bug which breaks element hiding on Safari (Closed)

Created:
May 14, 2014, 6:13 a.m. by Sebastian Noack
Modified:
May 14, 2014, 6:46 a.m.
Reviewers:
Wladimir Palant
Visibility:
Public.

Description

Issue 419 - Work around WebKit bug which breaks element hiding on Safari

Patch Set 1 #

Total comments: 2

Patch Set 2 : Addressed comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -2 lines) Patch
M lib/elemHide.js View 1 2 chunks +8 lines, -2 lines 0 comments Download

Messages

Total messages: 6
Sebastian Noack
May 14, 2014, 6:15 a.m. (2014-05-14 06:15:29 UTC) #1
Sebastian Noack
May 14, 2014, 6:15 a.m. (2014-05-14 06:15:33 UTC) #2
Wladimir Palant
LGTM with the nit fixed. http://codereview.adblockplus.org/6589722470121472/diff/5629499534213120/lib/elemHide.js File lib/elemHide.js (right): http://codereview.adblockplus.org/6589722470121472/diff/5629499534213120/lib/elemHide.js#newcode404 lib/elemHide.js:404: // workaround WebKit bug ...
May 14, 2014, 6:17 a.m. (2014-05-14 06:17:37 UTC) #3
Wladimir Palant
Note that this might only seem to fix the issue because getSelectorsForDomain() isn't JIT'ed. So ...
May 14, 2014, 6:25 a.m. (2014-05-14 06:25:22 UTC) #4
Sebastian Noack
http://codereview.adblockplus.org/6589722470121472/diff/5629499534213120/lib/elemHide.js File lib/elemHide.js (right): http://codereview.adblockplus.org/6589722470121472/diff/5629499534213120/lib/elemHide.js#newcode404 lib/elemHide.js:404: // workaround WebKit bug 132872, also see #419 On ...
May 14, 2014, 6:40 a.m. (2014-05-14 06:40:19 UTC) #5
Sebastian Noack
May 14, 2014, 6:44 a.m. (2014-05-14 06:44:43 UTC) #6
On 2014/05/14 06:25:22, Wladimir Palant wrote:
> Note that this might only seem to fix the issue because
getSelectorsForDomain()
> isn't JIT'ed. So please try running the following from the console:
> 
>   for (var i = 0; i < 100; i++)
{ElemHide.getSelectorsForDomain("nytimes.com")}

Your concerns are justified. However I couldn't reproduce it by running the code
above from the console. Neither do I have a better idea to work around that
issue. The only alternatives I see, would be either catching the exception from
Object.defineProperty, or not defining a property on the instance at all. Which
both would degrade the performance.

Powered by Google App Engine
This is Rietveld