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

Issue 29824589: Issue 6538, 6781 - Allow snippets only from circumvention lists (Closed)

Created:
July 6, 2018, 3:18 p.m. by Manish Jethani
Modified:
July 11, 2018, 6:04 p.m.
Reviewers:
kzar, hub
Base URL:
https://hg.adblockplus.org/adblockpluscore/
Visibility:
Public.

Description

Based on https://codereview.adblockplus.org/29737558/ and https://codereview.adblockplus.org/29824575/

Patch Set 1 #

Patch Set 2 : Remove redundant check in for loop #

Patch Set 3 : Improve unit tests #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -5 lines) Patch
M lib/filterListener.js View 1 2 chunks +15 lines, -3 lines 5 comments Download
M test/filterListener.js View 1 2 3 chunks +35 lines, -2 lines 0 comments Download

Messages

Total messages: 8
Manish Jethani
July 6, 2018, 3:18 p.m. (2018-07-06 15:18:07 UTC) #1
Manish Jethani
Patch Set 1 As per the plan for the initial "alpha" release, we will execute ...
July 6, 2018, 3:23 p.m. (2018-07-06 15:23:10 UTC) #2
Manish Jethani
Patch Set 2: Remove redundant check in for loop Patch Set 3: Improve unit tests
July 10, 2018, 7:17 a.m. (2018-07-10 07:17:24 UTC) #3
kzar
https://codereview.adblockplus.org/29824589/diff/29826558/lib/filterListener.js File lib/filterListener.js (right): https://codereview.adblockplus.org/29824589/diff/29826558/lib/filterListener.js#newcode145 lib/filterListener.js:145: for (let i = 0; i < filter.subscriptions.length; i++) ...
July 10, 2018, 2:38 p.m. (2018-07-10 14:38:36 UTC) #4
Manish Jethani
https://codereview.adblockplus.org/29824589/diff/29826558/lib/filterListener.js File lib/filterListener.js (right): https://codereview.adblockplus.org/29824589/diff/29826558/lib/filterListener.js#newcode145 lib/filterListener.js:145: for (let i = 0; i < filter.subscriptions.length; i++) ...
July 10, 2018, 6:33 p.m. (2018-07-10 18:33:22 UTC) #5
kzar
https://codereview.adblockplus.org/29824589/diff/29826558/lib/filterListener.js File lib/filterListener.js (right): https://codereview.adblockplus.org/29824589/diff/29826558/lib/filterListener.js#newcode145 lib/filterListener.js:145: for (let i = 0; i < filter.subscriptions.length; i++) ...
July 10, 2018, 6:56 p.m. (2018-07-10 18:56:00 UTC) #6
Manish Jethani
https://codereview.adblockplus.org/29824589/diff/29826558/lib/filterListener.js File lib/filterListener.js (right): https://codereview.adblockplus.org/29824589/diff/29826558/lib/filterListener.js#newcode145 lib/filterListener.js:145: for (let i = 0; i < filter.subscriptions.length; i++) ...
July 11, 2018, 3:07 p.m. (2018-07-11 15:07:04 UTC) #7
kzar
July 11, 2018, 5:22 p.m. (2018-07-11 17:22:07 UTC) #8
LGTM

https://codereview.adblockplus.org/29824589/diff/29826558/lib/filterListener.js
File lib/filterListener.js (right):

https://codereview.adblockplus.org/29824589/diff/29826558/lib/filterListener....
lib/filterListener.js:145: for (let i = 0; i < filter.subscriptions.length; i++)
On 2018/07/11 15:07:03, Manish Jethani wrote:
> On 2018/07/10 18:56:00, kzar wrote:
> > On 2018/07/10 18:33:22, Manish Jethani wrote:
> > > On 2018/07/10 14:38:35, kzar wrote:
> > > > Nit: `for (let subscription of filter.subscriptions)`
> > > 
> > > I did this initially and then reverted it. There's a similar loop in the
> > > removeFilter function. The way I see it, this would be an unrelated
change.
> I
> > > think it should be done separately as a "no issue", also in the
removeFilter
> > > function.
> > 
> > Sure it's an unrelated change, but you're changing the entire loop anyway,
it
> > seems crazy not to fix this at the same time IMO.
> 
> There are some performance implications of for..of [1] which really matters on
> mobile. I would like to properly test/benchmark it and make the change in both
> places.
> 
> [1]:
> https://www.incredible-web.com/blog/performance-of-for-loops-with-javascript/

Fine.

Powered by Google App Engine
This is Rietveld