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

Issue 29465639: Issue 5309 - Subscriptions update causes ANR (Closed)

Created:
June 14, 2017, 2:57 p.m. by sergei
Modified:
July 7, 2017, 12:54 p.m.
CC:
Felix Dahlke
Base URL:
github.com:abby-sergz/libadblockplus-android.git
Visibility:
Public.

Description

This code schedules updating of a particular intercepted subscription with zero timeout using the timer of JS engine. - The timer is not blocked while JS code is running, so the caller won't be blocked. - The timer is chosen because its lifespan is bound to the JS engine, what should eliminate any potential misuse of JS and FilterEngine and should avoid an addition manual work with a thread. #depends on https://codereview.adblockplus.org/29465626/ COLLABORATOR=anton@adblockplus.org

Patch Set 1 : @sergz #

Total comments: 15

Patch Set 2 : address comments@sergz #

Patch Set 3 : removed unneeded passing of AdblockEngine instance to wrapper listener@anton #

Patch Set 4 : remove changes of another codereview@sergz #

Patch Set 5 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -75 lines) Patch
M libadblockplus-android/jni/JniFilterEngine.cpp View 1 2 3 4 5 chunks +42 lines, -11 lines 0 comments Download
A + libadblockplus-android/jni/JniJsEngine.h View 1 chunk +9 lines, -11 lines 0 comments Download
M libadblockplus-android/jni/JniJsEngine.cpp View 2 3 3 chunks +8 lines, -3 lines 0 comments Download
M libadblockplus-android/jni/Utils.h View 1 chunk +1 line, -0 lines 0 comments Download
M libadblockplus-android/jni/Utils.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java View 2 chunks +12 lines, -0 lines 0 comments Download
M libadblockplus-android/src/org/adblockplus/libadblockplus/android/AdblockEngine.java View 1 2 3 chunks +12 lines, -50 lines 0 comments Download

Messages

Total messages: 8
sergei
June 14, 2017, 3:10 p.m. (2017-06-14 15:10:14 UTC) #1
anton
https://codereview.adblockplus.org/29465639/diff/29465640/libadblockplus-android/jni/JniFilterEngine.cpp File libadblockplus-android/jni/JniFilterEngine.cpp (right): https://codereview.adblockplus.org/29465639/diff/29465640/libadblockplus-android/jni/JniFilterEngine.cpp#newcode545 libadblockplus-android/jni/JniFilterEngine.cpp:545: if (!filterEngine) "{" required here https://codereview.adblockplus.org/29465639/diff/29465640/libadblockplus-android/jni/JniFilterEngine.cpp#newcode547 libadblockplus-android/jni/JniFilterEngine.cpp:547: for (auto& ...
June 15, 2017, 5:51 a.m. (2017-06-15 05:51:54 UTC) #2
sergei
https://codereview.adblockplus.org/29465639/diff/29465640/libadblockplus-android/jni/JniFilterEngine.cpp File libadblockplus-android/jni/JniFilterEngine.cpp (right): https://codereview.adblockplus.org/29465639/diff/29465640/libadblockplus-android/jni/JniFilterEngine.cpp#newcode545 libadblockplus-android/jni/JniFilterEngine.cpp:545: if (!filterEngine) On 2017/06/15 05:51:53, anton wrote: > "{" ...
June 16, 2017, 11:12 a.m. (2017-06-16 11:12:09 UTC) #3
anton
https://codereview.adblockplus.org/29465639/diff/29465640/libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java File libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java (right): https://codereview.adblockplus.org/29465639/diff/29465640/libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java#newcode204 libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java:204: public void updateFiltersAsync(String subscriptionUrl) On 2017/06/16 11:12:08, sergei wrote: ...
June 16, 2017, 11:25 a.m. (2017-06-16 11:25:12 UTC) #4
anton
On 2017/06/16 11:25:12, anton wrote: > https://codereview.adblockplus.org/29465639/diff/29465640/libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java > File libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java > (right): > > https://codereview.adblockplus.org/29465639/diff/29465640/libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java#newcode204 ...
June 16, 2017, 12:35 p.m. (2017-06-16 12:35:16 UTC) #5
anton
On 2017/06/16 12:35:16, anton wrote: > On 2017/06/16 11:25:12, anton wrote: > > > https://codereview.adblockplus.org/29465639/diff/29465640/libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java ...
June 16, 2017, 1:27 p.m. (2017-06-16 13:27:21 UTC) #6
sergei
Could you please review it and I think Anton could commit it after approving.
July 3, 2017, 7:55 a.m. (2017-07-03 07:55:50 UTC) #7
diegocarloslima
July 6, 2017, 6:46 p.m. (2017-07-06 18:46:35 UTC) #8
On 2017/07/03 07:55:50, sergei wrote:
> Could you please review it and I think Anton could commit it after approving.

LGTM

Powered by Google App Engine
This is Rietveld