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

Issue 29398705: Issue 5052 - Allow importing and exporting filterStorage data without file access (Closed)

Created:
March 30, 2017, 12:21 p.m. by Wladimir Palant
Modified:
March 30, 2017, 4:45 p.m.
Reviewers:
kzar
Base URL:
https://hg.adblockplus.org/adblockpluscore/
Visibility:
Public.

Description

Issue 5052 - Allow importing and exporting filterStorage data without file access

Patch Set 1 #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+139 lines, -137 lines) Patch
M lib/filterStorage.js View 4 chunks +139 lines, -137 lines 7 comments Download

Messages

Total messages: 4
Wladimir Palant
March 30, 2017, 12:21 p.m. (2017-03-30 12:21:25 UTC) #1
kzar
https://codereview.adblockplus.org/29398705/diff/29398706/lib/filterStorage.js File lib/filterStorage.js (right): https://codereview.adblockplus.org/29398705/diff/29398706/lib/filterStorage.js#newcode417 lib/filterStorage.js:417: parser.process(line); I wonder why we parser.process the final null? ...
March 30, 2017, 12:58 p.m. (2017-03-30 12:58:48 UTC) #2
Wladimir Palant
https://codereview.adblockplus.org/29398705/diff/29398706/lib/filterStorage.js File lib/filterStorage.js (right): https://codereview.adblockplus.org/29398705/diff/29398706/lib/filterStorage.js#newcode417 lib/filterStorage.js:417: parser.process(line); On 2017/03/30 12:58:48, kzar wrote: > I wonder ...
March 30, 2017, 1:02 p.m. (2017-03-30 13:02:06 UTC) #3
kzar
March 30, 2017, 1:10 p.m. (2017-03-30 13:10:54 UTC) #4
LGTM

https://codereview.adblockplus.org/29398705/diff/29398706/lib/filterStorage.js
File lib/filterStorage.js (right):

https://codereview.adblockplus.org/29398705/diff/29398706/lib/filterStorage.j...
lib/filterStorage.js:417: parser.process(line);
On 2017/03/30 13:02:06, Wladimir Palant wrote:
> On 2017/03/30 12:58:48, kzar wrote:
> > I wonder why we parser.process the final null?
> 
> The parser uses it to flush out whatever object was "in progress" right now.

Acknowledged.

https://codereview.adblockplus.org/29398705/diff/29398706/lib/filterStorage.j...
lib/filterStorage.js:543: // Do not persist external subscriptions
On 2017/03/30 13:02:06, Wladimir Palant wrote:
> On 2017/03/30 12:58:48, kzar wrote:
> > Nit: I guess we could avoid doing this filtering until after the header
lines
> > have been consumed. Probably doesn't matter in practice.
> 
> Better not. This is creating a copy of the list for another reason as well -
if
> the list changes in the meantime we won't save bogus data. And consumption of
> generator data is async.

Ah OK, makes sense.

Powered by Google App Engine
This is Rietveld