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

Issue 29723684: Issue 6382 - Catch InvalidAccessError exception when checking styles. (Closed)

Created:
March 15, 2018, 9:43 p.m. by hub
Modified:
April 19, 2018, 11:56 a.m.
Reviewers:
Sebastian Noack, kzar
Base URL:
https://hg.adblockplus.org/adblockpluscore/
Visibility:
Public.

Description

Issue 6382 - Catch InvalidAccessError exception when checking styles. If the exception isn't caught, the filtering will never happen.

Patch Set 1 #

Total comments: 6

Patch Set 2 : Shrink the try{} block #

Total comments: 3

Patch Set 3 : Link to the code to explain the exception #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -1 line) Patch
M lib/content/elemHideEmulation.js View 1 2 1 chunk +14 lines, -1 line 0 comments Download

Messages

Total messages: 7
hub
March 15, 2018, 9:43 p.m. (2018-03-15 21:43:53 UTC) #1
kzar
https://codereview.adblockplus.org/29723684/diff/29723685/lib/content/elemHideEmulation.js File lib/content/elemHideEmulation.js (right): https://codereview.adblockplus.org/29723684/diff/29723685/lib/content/elemHideEmulation.js#newcode531 lib/content/elemHideEmulation.js:531: let rules = stylesheet.cssRules; If this is the only ...
March 19, 2018, 3:52 p.m. (2018-03-19 15:52:07 UTC) #2
hub
https://codereview.adblockplus.org/29723684/diff/29723685/lib/content/elemHideEmulation.js File lib/content/elemHideEmulation.js (right): https://codereview.adblockplus.org/29723684/diff/29723685/lib/content/elemHideEmulation.js#newcode531 lib/content/elemHideEmulation.js:531: let rules = stylesheet.cssRules; On 2018/03/19 15:52:07, kzar wrote: ...
March 20, 2018, 2:53 p.m. (2018-03-20 14:53:53 UTC) #3
hub
https://codereview.adblockplus.org/29723684/diff/29723685/lib/content/elemHideEmulation.js File lib/content/elemHideEmulation.js (right): https://codereview.adblockplus.org/29723684/diff/29723685/lib/content/elemHideEmulation.js#newcode545 lib/content/elemHideEmulation.js:545: // On Firefox, there is a chance that an ...
March 20, 2018, 4:16 p.m. (2018-03-20 16:16:02 UTC) #4
kzar
Sorry again for being so slow with these reviews. https://codereview.adblockplus.org/29723684/diff/29723685/lib/content/elemHideEmulation.js File lib/content/elemHideEmulation.js (right): https://codereview.adblockplus.org/29723684/diff/29723685/lib/content/elemHideEmulation.js#newcode545 lib/content/elemHideEmulation.js:545: ...
April 18, 2018, 4:12 p.m. (2018-04-18 16:12:31 UTC) #5
hub
https://codereview.adblockplus.org/29723684/diff/29723685/lib/content/elemHideEmulation.js File lib/content/elemHideEmulation.js (right): https://codereview.adblockplus.org/29723684/diff/29723685/lib/content/elemHideEmulation.js#newcode545 lib/content/elemHideEmulation.js:545: // On Firefox, there is a chance that an ...
April 18, 2018, 6:48 p.m. (2018-04-18 18:48:24 UTC) #6
kzar
April 19, 2018, 7:29 a.m. (2018-04-19 07:29:29 UTC) #7
LGTM

https://codereview.adblockplus.org/29723684/diff/29728600/lib/content/elemHid...
File lib/content/elemHideEmulation.js (right):

https://codereview.adblockplus.org/29723684/diff/29728600/lib/content/elemHid...
lib/content/elemHideEmulation.js:622: continue;
On 2018/04/18 18:48:23, hub wrote:
> On 2018/04/18 16:12:30, kzar wrote:
> > I wonder if we should check that the exception really is an
InvalidAccessError
> > before continuing? Then we wouldn't ignore other exceptions, also we could
> > shorten the comment since the code would already be clear about the type of
> > exception we're worrying about.
> 
> The intent here is to catch the exception to not interrupt the processing.
There
> is nothing much we can do instead so I don't think it matters.

Acknowledged.

Powered by Google App Engine
This is Rietveld