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

Issue 29556626: Issue 5790 - Get ready for integration into Chromium (Closed)

Created:
Sept. 26, 2017, 11:29 a.m. by anton
Modified:
Oct. 3, 2017, 6:48 a.m.
CC:
René Jeschke, Felix Dahlke
Visibility:
Public.

Description

Issue 5790 - Get ready for integration into Chromium

Patch Set 1 #

Total comments: 6

Patch Set 2 : Renamed to getNativePtr() #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -3 lines) Patch
M libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java View 3 chunks +14 lines, -2 lines 0 comments Download
M libadblockplus-android/jni/JniFilterEngine.cpp View 1 2 chunks +12 lines, -1 line 0 comments Download
M libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java View 1 2 chunks +10 lines, -0 lines 1 comment Download

Messages

Total messages: 11
anton
Sept. 26, 2017, 11:30 a.m. (2017-09-26 11:30:07 UTC) #1
sergei
It's not clear why this change is useful but in general good for me. https://codereview.adblockplus.org/29556626/diff/29556627/libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java ...
Sept. 26, 2017, 12:04 p.m. (2017-09-26 12:04:30 UTC) #2
anton
https://codereview.adblockplus.org/29556626/diff/29556627/libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java File libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java (right): https://codereview.adblockplus.org/29556626/diff/29556627/libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java#newcode203 libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java:203: public long getFilterEnginePtr() { On 2017/09/26 12:04:29, sergei wrote: ...
Sept. 26, 2017, 12:18 p.m. (2017-09-26 12:18:41 UTC) #3
sergei
https://codereview.adblockplus.org/29556626/diff/29556627/libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java File libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java (right): https://codereview.adblockplus.org/29556626/diff/29556627/libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java#newcode244 libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java:244: public synchronized boolean retain(boolean asynchronous) Could you please point ...
Sept. 28, 2017, 8:29 a.m. (2017-09-28 08:29:03 UTC) #4
anton
Uploaded new patch set with renaming https://codereview.adblockplus.org/29556626/diff/29556627/libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java File libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java (right): https://codereview.adblockplus.org/29556626/diff/29556627/libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java#newcode244 libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java:244: public synchronized boolean ...
Sept. 28, 2017, 9:08 a.m. (2017-09-28 09:08:40 UTC) #5
sergei
https://codereview.adblockplus.org/29556626/diff/29556627/libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java File libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java (right): https://codereview.adblockplus.org/29556626/diff/29556627/libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java#newcode244 libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java:244: public synchronized boolean retain(boolean asynchronous) On 2017/09/28 09:08:39, anton ...
Sept. 28, 2017, 9:33 a.m. (2017-09-28 09:33:05 UTC) #6
sergei
LGTM
Sept. 28, 2017, 9:33 a.m. (2017-09-28 09:33:19 UTC) #7
diegocarloslima
https://codereview.adblockplus.org/29556626/diff/29558584/libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java File libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java (right): https://codereview.adblockplus.org/29556626/diff/29558584/libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java#newcode205 libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java:205: } Well, this ain't a good practice to expose/share ...
Sept. 28, 2017, 11:55 a.m. (2017-09-28 11:55:30 UTC) #8
anton
On 2017/09/28 11:55:30, diegocarloslima wrote: > https://codereview.adblockplus.org/29556626/diff/29558584/libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java > File libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java > (right): > > https://codereview.adblockplus.org/29556626/diff/29558584/libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java#newcode205 ...
Sept. 28, 2017, 12:37 p.m. (2017-09-28 12:37:33 UTC) #9
sergei
On 2017/09/28 12:37:33, anton wrote: .... > Since Chromium has huge c++ base and Java(Android) ...
Sept. 28, 2017, 2:36 p.m. (2017-09-28 14:36:52 UTC) #10
diegocarloslima
Oct. 2, 2017, 3:40 p.m. (2017-10-02 15:40:53 UTC) #11
On 2017/09/28 14:36:52, sergei wrote:
> On 2017/09/28 12:37:33, anton wrote:
> ....
> > Since Chromium has huge c++ base and Java(Android) code we could integrate
c++
> > but we need UI and it's in Android code only.
> > We have to use Java's filter engine anyway for UI. So we have to integrate
> > libadblockplus-android,
> > not just libadblockplus. But filtering is done in C++ code
> > (chrome_network_delegate.cc) we have to have C++ filter engine OR create JNI
> > bridge to java and work with
> > Java's filter engine instance.
> > 
> > So we have to choose between less safety (working with raw C++ pointer
> retrieved
> > from Java's FilterEngine with 'getNativePtr()') + better performance and
more
> > safety + much less performance.
> > Imagine every filter engine call should be wrapped into Java call and
> arguments
> > converting.
> > 
> > So it's working in c++ in chromium and in c++ in libadblockplus.
> > I don't think we should forward it to Java (create new JNI bridge) and then
> use
> > libadblockplus-android (which is actually JNI bridge too) because of
overhead
> > but for better safety.
> 
> Thanks for the explanation, I had similar questions too, now it's clearer and
> for me it's fine. It's actually a good point what should be the balance and
how
> to organize these things, if you don't mind I would like to have it in some
> issue, so we can revisit it later and think about/discuss/work on it
separately
> from this review.

LGTM

Powered by Google App Engine
This is Rietveld