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

Issue 5740786045943808: Issue 189 - Implement API changes from #117, #153, #192 in libadblockplus (Closed)

Created:
April 14, 2014, 9:14 p.m. by Wladimir Palant
Modified:
April 24, 2014, 11:25 a.m.
Reviewers:
Felix Dahlke
Visibility:
Public.

Description

Tests had to be adjusted because an existing patterns.ini file with no data doesn`t trigger first-run actions any more - only a missing file does.

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -33 lines) Patch
M .hgsubstate View 1 chunk +1 line, -1 line 0 comments Download
M lib/init.js View 1 chunk +2 lines, -5 lines 3 comments Download
M lib/io.js View 1 chunk +4 lines, -12 lines 0 comments Download
M lib/prefs.js View 1 chunk +1 line, -1 line 0 comments Download
M lib/utils.js View 2 chunks +5 lines, -1 line 0 comments Download
M test/FilterEngine.cpp View 3 chunks +11 lines, -13 lines 0 comments Download

Messages

Total messages: 4
Wladimir Palant
April 14, 2014, 9:14 p.m. (2014-04-14 21:14:19 UTC) #1
Felix Dahlke
Looks good, just one comment. http://codereview.adblockplus.org/5740786045943808/diff/5629499534213120/lib/init.js File lib/init.js (right): http://codereview.adblockplus.org/5740786045943808/diff/5629499534213120/lib/init.js#newcode29 lib/init.js:29: _triggerEvent("init", require("filterStorage").FilterStorage.firstRun); Also required ...
April 23, 2014, 9:43 a.m. (2014-04-23 09:43:22 UTC) #2
Wladimir Palant
http://codereview.adblockplus.org/5740786045943808/diff/5629499534213120/lib/init.js File lib/init.js (right): http://codereview.adblockplus.org/5740786045943808/diff/5629499534213120/lib/init.js#newcode29 lib/init.js:29: _triggerEvent("init", require("filterStorage").FilterStorage.firstRun); On 2014/04/23 09:43:22, Felix H. Dahlke wrote: ...
April 23, 2014, 10:40 a.m. (2014-04-23 10:40:36 UTC) #3
Felix Dahlke
April 24, 2014, 11:11 a.m. (2014-04-24 11:11:41 UTC) #4
LGTM

http://codereview.adblockplus.org/5740786045943808/diff/5629499534213120/lib/...
File lib/init.js (right):

http://codereview.adblockplus.org/5740786045943808/diff/5629499534213120/lib/...
lib/init.js:29: _triggerEvent("init",
require("filterStorage").FilterStorage.firstRun);
On 2014/04/23 10:40:36, Wladimir Palant wrote:
> On 2014/04/23 09:43:22, Felix H. Dahlke wrote:
> > Also required below, I'd vote for doing this once above.
> 
> This isn't a real module loading mechanism here, modules load in a fixed order
> as defined in the convert_js build step. We can move init.js below
> filterStorage.js of course but that will mean that filterStorage.js
initializes
> before the code here has a chance to run. This will introduce a slight chance
> for the "load" event to fire before we register the listener below. Nothing
that
> can't be fixed but before I open that can of worms I'll rather require() the
> module twice.

Well, that's a leaky abstraction if there ever was one. I agree that it
shouldn't be fixed as part of this review though. I've filed a issue for
discussing this: https://issues.adblockplus.org/ticket/378

Powered by Google App Engine
This is Rietveld