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

Issue 4826014056185856: Add filtersLoaded and filterLoadListener to AdblockPlusApi (Closed)

Created:
March 20, 2015, 3:59 p.m. by Felix Dahlke
Modified:
May 21, 2015, 11:49 a.m.
Visibility:
Public.

Description

Add filtersLoaded and filterLoadListener to AdblockPlusApi

Patch Set 1 : #

Total comments: 8

Patch Set 2 : Discard listener, remove redundant check #

Patch Set 3 : Discard the filter listener, not the filter load listener #

Patch Set 4 : Use FilterStorage._loading to check if filters have been loaded #

Total comments: 2

Patch Set 5 : Remove filterListener before invoking filterLoadListener #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -0 lines) Patch
M adblockplus/Api.jsm View 1 2 3 4 2 chunks +16 lines, -0 lines 2 comments Download

Messages

Total messages: 9
Felix Dahlke
These allow us to check whether ABP is fully loaded, and wait for it if ...
March 20, 2015, 4:29 p.m. (2015-03-20 16:29:09 UTC) #1
Wladimir Palant
http://codereview.adblockplus.org/4826014056185856/diff/5668600916475904/adblockplus/Api.jsm File adblockplus/Api.jsm (right): http://codereview.adblockplus.org/4826014056185856/diff/5668600916475904/adblockplus/Api.jsm#newcode46 adblockplus/Api.jsm:46: return filtersLoaded; return FilterStorage._loading? http://codereview.adblockplus.org/4826014056185856/diff/5668600916475904/adblockplus/Api.jsm#newcode66 adblockplus/Api.jsm:66: filtersLoaded = true; ...
March 20, 2015, 4:38 p.m. (2015-03-20 16:38:20 UTC) #2
Felix Dahlke
New patch set is up. http://codereview.adblockplus.org/4826014056185856/diff/5668600916475904/adblockplus/Api.jsm File adblockplus/Api.jsm (right): http://codereview.adblockplus.org/4826014056185856/diff/5668600916475904/adblockplus/Api.jsm#newcode46 adblockplus/Api.jsm:46: return filtersLoaded; On 2015/03/20 ...
March 20, 2015, 4:54 p.m. (2015-03-20 16:54:57 UTC) #3
Felix Dahlke
Another patch set :) http://codereview.adblockplus.org/4826014056185856/diff/5668600916475904/adblockplus/Api.jsm File adblockplus/Api.jsm (right): http://codereview.adblockplus.org/4826014056185856/diff/5668600916475904/adblockplus/Api.jsm#newcode66 adblockplus/Api.jsm:66: filtersLoaded = true; On 2015/03/20 ...
March 20, 2015, 5:13 p.m. (2015-03-20 17:13:06 UTC) #4
Felix Dahlke
New patch set for a change! http://codereview.adblockplus.org/4826014056185856/diff/5668600916475904/adblockplus/Api.jsm File adblockplus/Api.jsm (right): http://codereview.adblockplus.org/4826014056185856/diff/5668600916475904/adblockplus/Api.jsm#newcode46 adblockplus/Api.jsm:46: return filtersLoaded; On ...
March 20, 2015, 9:13 p.m. (2015-03-20 21:13:01 UTC) #5
Wladimir Palant
http://codereview.adblockplus.org/4826014056185856/diff/5733935958982656/adblockplus/Api.jsm File adblockplus/Api.jsm (right): http://codereview.adblockplus.org/4826014056185856/diff/5733935958982656/adblockplus/Api.jsm#newcode66 adblockplus/Api.jsm:66: FilterNotifier.removeListener(filterListener); Please remove listener as the very first thing ...
March 22, 2015, 7:23 p.m. (2015-03-22 19:23:34 UTC) #6
Felix Dahlke
New patch set. http://codereview.adblockplus.org/4826014056185856/diff/5733935958982656/adblockplus/Api.jsm File adblockplus/Api.jsm (right): http://codereview.adblockplus.org/4826014056185856/diff/5733935958982656/adblockplus/Api.jsm#newcode66 adblockplus/Api.jsm:66: FilterNotifier.removeListener(filterListener); On 2015/03/22 19:23:34, Wladimir Palant ...
March 22, 2015, 8:59 p.m. (2015-03-22 20:59:31 UTC) #7
René Jeschke
http://codereview.adblockplus.org/4826014056185856/diff/5673385510043648/adblockplus/Api.jsm File adblockplus/Api.jsm (right): http://codereview.adblockplus.org/4826014056185856/diff/5673385510043648/adblockplus/Api.jsm#newcode59 adblockplus/Api.jsm:59: FilterNotifier.addListener(function filterListener(action) Oh, and from my side: we do ...
March 22, 2015, 9:01 p.m. (2015-03-22 21:01:45 UTC) #8
Felix Dahlke
March 22, 2015, 9:13 p.m. (2015-03-22 21:13:28 UTC) #9
http://codereview.adblockplus.org/4826014056185856/diff/5673385510043648/adbl...
File adblockplus/Api.jsm (right):

http://codereview.adblockplus.org/4826014056185856/diff/5673385510043648/adbl...
adblockplus/Api.jsm:59: FilterNotifier.addListener(function
filterListener(action)
On 2015/03/22 21:01:46, René Jeschke wrote:
> Oh, and from my side: we do not even really need this listener, anyway. I
really
> only need 'get filtersLoaded()' above.

Right, we _can't_ use it there, actually - interaction between Java and JS is
worse than I thought.

In the spirit of not adding unused code, I'll close this review. René can add
the filtersLoaded getter above (as it is there) to his patch.

Powered by Google App Engine
This is Rietveld