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

Issue 30013628: Issue 7029 - Remove subscriptions property of Filter object (Closed)

Created:
Feb. 22, 2019, 4:13 a.m. by Manish Jethani
Modified:
April 7, 2019, 11:58 a.m.
Reviewers:
hub
Base URL:
https://hg.adblockplus.org/adblockpluscore/
Visibility:
Public.

Patch Set 1 : #

Total comments: 14
Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -178 lines) Patch
M lib/filterClasses.js View 1 chunk +0 lines, -75 lines 0 comments Download
M lib/filterListener.js View 6 chunks +10 lines, -7 lines 1 comment Download
M lib/filterStorage.js View 6 chunks +20 lines, -49 lines 3 comments Download
M lib/iniParser.js View 1 chunk +0 lines, -3 lines 4 comments Download
M lib/subscriptionClasses.js View 2 chunks +27 lines, -1 line 5 comments Download
M test/filterListener.js View 1 chunk +5 lines, -5 lines 0 comments Download
M test/filterStorage.js View 1 chunk +1 line, -1 line 0 comments Download
M test/filterStorage_readwrite.js View 1 chunk +0 lines, -21 lines 1 comment Download
M test/subscriptionClasses.js View 1 chunk +16 lines, -16 lines 0 comments Download

Messages

Total messages: 8
Manish Jethani
Feb. 22, 2019, 4:13 a.m. (2019-02-22 04:13:11 UTC) #1
Manish Jethani
Patch Set 1 https://codereview.adblockplus.org/30013628/diff/30016567/lib/filterListener.js File lib/filterListener.js (right): https://codereview.adblockplus.org/30013628/diff/30016567/lib/filterListener.js#newcode137 lib/filterListener.js:137: * @param {?Array.<Subscription>} [subscriptions] subscriptions to ...
Feb. 26, 2019, 12:29 p.m. (2019-02-26 12:29:57 UTC) #2
hub
https://codereview.adblockplus.org/30013628/diff/30016567/lib/filterStorage.js File lib/filterStorage.js (left): https://codereview.adblockplus.org/30013628/diff/30016567/lib/filterStorage.js#oldcode201 lib/filterStorage.js:201: disconnectSubscriptionFilters(subscription, oldFilterText); On 2019/02/26 12:29:57, Manish Jethani wrote: > ...
March 8, 2019, 9:36 p.m. (2019-03-08 21:36:20 UTC) #3
Manish Jethani
https://codereview.adblockplus.org/30013628/diff/30016567/lib/filterStorage.js File lib/filterStorage.js (left): https://codereview.adblockplus.org/30013628/diff/30016567/lib/filterStorage.js#oldcode201 lib/filterStorage.js:201: disconnectSubscriptionFilters(subscription, oldFilterText); On 2019/03/08 21:36:19, hub wrote: > On ...
March 30, 2019, 8:50 p.m. (2019-03-30 20:50:35 UTC) #4
Manish Jethani
https://codereview.adblockplus.org/30013628/diff/30016567/lib/iniParser.js File lib/iniParser.js (left): https://codereview.adblockplus.org/30013628/diff/30016567/lib/iniParser.js#oldcode112 lib/iniParser.js:112: Filter.fromText(text).addSubscription(currentSubscription); A side effect of this change is that ...
March 30, 2019, 9:01 p.m. (2019-03-30 21:01:45 UTC) #5
hub
https://codereview.adblockplus.org/30013628/diff/30016567/lib/iniParser.js File lib/iniParser.js (left): https://codereview.adblockplus.org/30013628/diff/30016567/lib/iniParser.js#oldcode112 lib/iniParser.js:112: Filter.fromText(text).addSubscription(currentSubscription); On 2019/03/30 21:01:44, Manish Jethani wrote: > A ...
April 4, 2019, 3:48 a.m. (2019-04-04 03:48:15 UTC) #6
Manish Jethani
https://codereview.adblockplus.org/30013628/diff/30016567/lib/iniParser.js File lib/iniParser.js (left): https://codereview.adblockplus.org/30013628/diff/30016567/lib/iniParser.js#oldcode112 lib/iniParser.js:112: Filter.fromText(text).addSubscription(currentSubscription); On 2019/04/04 03:48:15, hub wrote: > On 2019/03/30 ...
April 4, 2019, 5:44 a.m. (2019-04-04 05:44:20 UTC) #7
hub
April 4, 2019, 8:54 p.m. (2019-04-04 20:54:45 UTC) #8
LGTM

https://codereview.adblockplus.org/30013628/diff/30016567/lib/iniParser.js
File lib/iniParser.js (left):

https://codereview.adblockplus.org/30013628/diff/30016567/lib/iniParser.js#ol...
lib/iniParser.js:112:
Filter.fromText(text).addSubscription(currentSubscription);
On 2019/04/04 05:44:20, Manish Jethani wrote:
> On 2019/04/04 03:48:15, hub wrote:
> > On 2019/03/30 21:01:44, Manish Jethani wrote:
> > > A side effect of this change is that `Filter` objects are not created for
> > > disabled subscriptions. They get created for enabled subscriptions for the
> > first
> > > time in `lib/filterListener.js` instead.
> > > 
> > > Unfortunately this does not last for too long because within a minute of
the
> > > extension being loaded the lists are synced and in
`onSubscriptionUpdated()`
> > in
> > > `lib/filterListener.js` we end up creating objects (even for filters we
are
> > > about to remove!). I intend to address all of this, step by step.
> > 
> > In this patch or in a future one?
> 
> In a future one, because it is an enhancement on top of this and not necessary
> to do for what we're trying to achieve here. The aim of this patch is to make
> all filter objects lose any state so they can be discarded. After this, we can
> do <https://codereview.adblockplus.org/29935564/> and then we should be able
to
> lose the `ElemHide` objects at least.

Acknowledged.

Powered by Google App Engine
This is Rietveld