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

Issue 29900557: Issue 7016 - Convert serialization functions into generators (Closed)

Created:
Oct. 3, 2018, 11:47 p.m. by Jon Sonesen
Modified:
Oct. 24, 2018, 5:24 p.m.
Visibility:
Public.

Description

Issue 7016 - Convert serialization functions into generators

Patch Set 1 #

Patch Set 2 : Remove unelated change #

Total comments: 39

Patch Set 3 : Address PS2 Comments #

Total comments: 10

Patch Set 4 : Actually Address PS2 Comments #

Total comments: 11

Patch Set 5 : Address PS4 Comments #

Total comments: 7

Patch Set 6 : Address PS5 Comments #

Total comments: 5

Patch Set 7 : Address Nits #

Patch Set 8 : Actually address nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -93 lines) Patch
M lib/filterClasses.js View 1 2 3 4 4 chunks +20 lines, -16 lines 0 comments Download
M lib/filterStorage.js View 1 2 3 4 5 1 chunk +3 lines, -16 lines 0 comments Download
M lib/subscriptionClasses.js View 1 2 3 4 5 6 7 5 chunks +71 lines, -57 lines 0 comments Download
M test/filterClasses.js View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M test/subscriptionClasses.js View 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 36
Jon Sonesen
Oct. 3, 2018, 11:48 p.m. (2018-10-03 23:48:03 UTC) #1
Manish Jethani
https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterStorage.js File lib/filterStorage.js (left): https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterStorage.js#oldcode467 lib/filterStorage.js:467: yield ""; I think we still need the blank ...
Oct. 4, 2018, 3:37 a.m. (2018-10-04 03:37:13 UTC) #2
Manish Jethani
https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterStorage.js File lib/filterStorage.js (left): https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterStorage.js#oldcode472 lib/filterStorage.js:472: buf.push("", "[Subscription filters]"); We would have to yield a ...
Oct. 4, 2018, 4:09 a.m. (2018-10-04 04:09:00 UTC) #3
Manish Jethani
https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterStorage.js File lib/filterStorage.js (right): https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterStorage.js#newcode468 lib/filterStorage.js:468: if (subscription.filters.length) On 2018/10/04 04:08:59, Manish Jethani wrote: > ...
Oct. 4, 2018, 4:17 a.m. (2018-10-04 04:17:06 UTC) #4
Manish Jethani
https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterStorage.js File lib/filterStorage.js (right): https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterStorage.js#newcode468 lib/filterStorage.js:468: if (subscription.filters.length) On 2018/10/04 04:17:06, Manish Jethani wrote: > ...
Oct. 4, 2018, 4:36 a.m. (2018-10-04 04:36:23 UTC) #5
Manish Jethani
https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterStorage.js File lib/filterStorage.js (left): https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterStorage.js#oldcode467 lib/filterStorage.js:467: yield ""; On 2018/10/04 03:37:12, Manish Jethani wrote: > ...
Oct. 4, 2018, 4:50 a.m. (2018-10-04 04:50:11 UTC) #6
Manish Jethani
https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterStorage.js File lib/filterStorage.js (right): https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterStorage.js#newcode468 lib/filterStorage.js:468: if (subscription.filters.length) On 2018/10/04 04:36:23, Manish Jethani wrote: > ...
Oct. 4, 2018, 5:10 a.m. (2018-10-04 05:10:07 UTC) #7
Manish Jethani
https://codereview.adblockplus.org/29900557/diff/29900565/lib/subscriptionClasses.js File lib/subscriptionClasses.js (right): https://codereview.adblockplus.org/29900557/diff/29900565/lib/subscriptionClasses.js#newcode431 lib/subscriptionClasses.js:431: yield new Error( On 2018/10/04 03:37:12, Manish Jethani wrote: ...
Oct. 4, 2018, 5:30 a.m. (2018-10-04 05:30:00 UTC) #8
Manish Jethani
https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterStorage.js File lib/filterStorage.js (right): https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterStorage.js#newcode468 lib/filterStorage.js:468: if (subscription.filters.length) On 2018/10/04 05:10:06, Manish Jethani wrote: > ...
Oct. 4, 2018, 6:10 a.m. (2018-10-04 06:10:15 UTC) #9
Jon Sonesen
https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterStorage.js File lib/filterStorage.js (left): https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterStorage.js#oldcode467 lib/filterStorage.js:467: yield ""; On 2018/10/04 04:50:11, Manish Jethani wrote: > ...
Oct. 6, 2018, 12:06 a.m. (2018-10-06 00:06:34 UTC) #10
Manish Jethani
https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterClasses.js File lib/filterClasses.js (right): https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterClasses.js#newcode151 lib/filterClasses.js:151: yield "[Filter]"; Let's extract the value of the text ...
Oct. 9, 2018, 3:11 p.m. (2018-10-09 15:11:04 UTC) #11
Jon Sonesen
https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterClasses.js File lib/filterClasses.js (right): https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterClasses.js#newcode151 lib/filterClasses.js:151: yield "[Filter]"; On 2018/10/09 15:11:03, Manish Jethani wrote: > ...
Oct. 12, 2018, 3:50 a.m. (2018-10-12 03:50:06 UTC) #12
Manish Jethani
https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterStorage.js File lib/filterStorage.js (right): https://codereview.adblockplus.org/29900557/diff/29900565/lib/filterStorage.js#newcode468 lib/filterStorage.js:468: if (subscription.filters.length) On 2018/10/12 03:50:05, Jon Sonesen wrote: > ...
Oct. 14, 2018, 8:05 p.m. (2018-10-14 20:05:37 UTC) #13
Jon Sonesen
https://codereview.adblockplus.org/29900557/diff/29907580/lib/subscriptionClasses.js File lib/subscriptionClasses.js (right): https://codereview.adblockplus.org/29900557/diff/29907580/lib/subscriptionClasses.js#newcode135 lib/subscriptionClasses.js:135: let {url, type, _title, _fixedTitle, _disabled} = this; On ...
Oct. 21, 2018, 6:18 a.m. (2018-10-21 06:18:24 UTC) #14
Manish Jethani
https://codereview.adblockplus.org/29900557/diff/29907580/lib/subscriptionClasses.js File lib/subscriptionClasses.js (right): https://codereview.adblockplus.org/29900557/diff/29907580/lib/subscriptionClasses.js#newcode135 lib/subscriptionClasses.js:135: let {url, type, _title, _fixedTitle, _disabled} = this; On ...
Oct. 21, 2018, 1:08 p.m. (2018-10-21 13:08:58 UTC) #15
Jon Sonesen
My bad, apparently I had neglected to commit some local changes prior to upload :/
Oct. 21, 2018, 7:54 p.m. (2018-10-21 19:54:35 UTC) #16
Jon Sonesen
My bad, apparently I had neglected to commit some local changes prior to upload :/
Oct. 21, 2018, 7:54 p.m. (2018-10-21 19:54:37 UTC) #17
Manish Jethani
https://codereview.adblockplus.org/29900557/diff/29918566/lib/filterClasses.js File lib/filterClasses.js (right): https://codereview.adblockplus.org/29900557/diff/29918566/lib/filterClasses.js#newcode146 lib/filterClasses.js:146: * Generates serialized filter. I like the previous comment, ...
Oct. 21, 2018, 9:51 p.m. (2018-10-21 21:51:43 UTC) #18
Manish Jethani
https://codereview.adblockplus.org/29900557/diff/29918566/lib/filterClasses.js File lib/filterClasses.js (right): https://codereview.adblockplus.org/29900557/diff/29918566/lib/filterClasses.js#newcode151 lib/filterClasses.js:151: let {text} = this; Nit: I would leave a ...
Oct. 21, 2018, 9:52 p.m. (2018-10-21 21:52:55 UTC) #19
Jon Sonesen
https://codereview.adblockplus.org/29900557/diff/29918566/lib/filterClasses.js File lib/filterClasses.js (right): https://codereview.adblockplus.org/29900557/diff/29918566/lib/filterClasses.js#newcode146 lib/filterClasses.js:146: * Generates serialized filter. On 2018/10/21 21:51:43, Manish Jethani ...
Oct. 22, 2018, 7:27 p.m. (2018-10-22 19:27:48 UTC) #20
Jon Sonesen
https://codereview.adblockplus.org/29900557/diff/29918566/lib/subscriptionClasses.js File lib/subscriptionClasses.js (right): https://codereview.adblockplus.org/29900557/diff/29918566/lib/subscriptionClasses.js#newcode151 lib/subscriptionClasses.js:151: for (let filter of this.filters) I noticed this method ...
Oct. 22, 2018, 7:32 p.m. (2018-10-22 19:32:40 UTC) #21
Manish Jethani
https://codereview.adblockplus.org/29900557/diff/29918566/lib/subscriptionClasses.js File lib/subscriptionClasses.js (right): https://codereview.adblockplus.org/29900557/diff/29918566/lib/subscriptionClasses.js#newcode151 lib/subscriptionClasses.js:151: for (let filter of this.filters) On 2018/10/22 19:32:40, Jon ...
Oct. 22, 2018, 8:18 p.m. (2018-10-22 20:18:02 UTC) #22
Jon Sonesen
https://codereview.adblockplus.org/29900557/diff/29919558/lib/filterStorage.js File lib/filterStorage.js (right): https://codereview.adblockplus.org/29900557/diff/29919558/lib/filterStorage.js#newcode495 lib/filterStorage.js:495: if (subscription.filters.length) On 2018/10/22 20:18:01, Manish Jethani wrote: > ...
Oct. 22, 2018, 10:59 p.m. (2018-10-22 22:59:36 UTC) #23
Manish Jethani
https://codereview.adblockplus.org/29900557/diff/29919558/lib/subscriptionClasses.js File lib/subscriptionClasses.js (right): https://codereview.adblockplus.org/29900557/diff/29919558/lib/subscriptionClasses.js#newcode160 lib/subscriptionClasses.js:160: return [...this.serialize()].join("\n"); On 2018/10/22 22:59:36, Jon Sonesen wrote: > ...
Oct. 22, 2018, 11:01 p.m. (2018-10-22 23:01:30 UTC) #24
Jon Sonesen
On 2018/10/22 23:01:30, Manish Jethani wrote: > https://codereview.adblockplus.org/29900557/diff/29919558/lib/subscriptionClasses.js > File lib/subscriptionClasses.js (right): > > https://codereview.adblockplus.org/29900557/diff/29919558/lib/subscriptionClasses.js#newcode160 ...
Oct. 22, 2018, 11:46 p.m. (2018-10-22 23:46:54 UTC) #25
Jon Sonesen
https://codereview.adblockplus.org/29900557/diff/29918566/lib/subscriptionClasses.js File lib/subscriptionClasses.js (right): https://codereview.adblockplus.org/29900557/diff/29918566/lib/subscriptionClasses.js#newcode151 lib/subscriptionClasses.js:151: for (let filter of this.filters) On 2018/10/22 20:18:01, Manish ...
Oct. 23, 2018, 2:04 a.m. (2018-10-23 02:04:25 UTC) #26
Manish Jethani
Except for a couple of minor nits, LGTM https://codereview.adblockplus.org/29900557/diff/29919569/lib/subscriptionClasses.js File lib/subscriptionClasses.js (right): https://codereview.adblockplus.org/29900557/diff/29919569/lib/subscriptionClasses.js#newcode128 lib/subscriptionClasses.js:128: * ...
Oct. 23, 2018, 3:02 a.m. (2018-10-23 03:02:18 UTC) #27
Jon Sonesen
https://codereview.adblockplus.org/29900557/diff/29919569/lib/subscriptionClasses.js File lib/subscriptionClasses.js (right): https://codereview.adblockplus.org/29900557/diff/29919569/lib/subscriptionClasses.js#newcode128 lib/subscriptionClasses.js:128: * Serializes the subscription for writing out on the ...
Oct. 23, 2018, 3:13 a.m. (2018-10-23 03:13:56 UTC) #28
Manish Jethani
https://codereview.adblockplus.org/29900557/diff/29919569/lib/subscriptionClasses.js File lib/subscriptionClasses.js (right): https://codereview.adblockplus.org/29900557/diff/29919569/lib/subscriptionClasses.js#newcode294 lib/subscriptionClasses.js:294: if (defaults && defaults.length) On 2018/10/23 03:13:55, Jon Sonesen ...
Oct. 23, 2018, 3:15 a.m. (2018-10-23 03:15:59 UTC) #29
Jon Sonesen
On 2018/10/23 03:15:59, Manish Jethani wrote: > https://codereview.adblockplus.org/29900557/diff/29919569/lib/subscriptionClasses.js > File lib/subscriptionClasses.js (right): > > https://codereview.adblockplus.org/29900557/diff/29919569/lib/subscriptionClasses.js#newcode294 ...
Oct. 23, 2018, 3:21 a.m. (2018-10-23 03:21:38 UTC) #30
Jon Sonesen
On 2018/10/23 03:21:38, Jon Sonesen wrote: > On 2018/10/23 03:15:59, Manish Jethani wrote: > > ...
Oct. 23, 2018, 3:22 a.m. (2018-10-23 03:22:48 UTC) #31
Manish Jethani
LGTM On 2018/10/23 03:22:48, Jon Sonesen wrote: > > Should we also wait for snoack ...
Oct. 23, 2018, 3:26 a.m. (2018-10-23 03:26:01 UTC) #32
Manish Jethani
On 2018/10/23 03:26:01, Manish Jethani wrote: > this will not require changes in the extension ...
Oct. 23, 2018, 3:26 a.m. (2018-10-23 03:26:40 UTC) #33
Jon Sonesen
Ack
Oct. 23, 2018, 5:34 p.m. (2018-10-23 17:34:03 UTC) #34
Manish Jethani
Committed and pushed: https://hg.adblockplus.org/adblockpluscore/rev/92121171f23e You can close this now.
Oct. 24, 2018, 3:19 p.m. (2018-10-24 15:19:37 UTC) #35
Jon Sonesen
Oct. 24, 2018, 5:23 p.m. (2018-10-24 17:23:52 UTC) #36
Thanks for your help!

Powered by Google App Engine
This is Rietveld