Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-present eyeo GmbH | 3 * Copyright (C) 2006-present eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 27 matching lines...) Expand all Loading... | |
38 { | 38 { |
39 this(ctor(logSystem, webRequest, basePath)); | 39 this(ctor(logSystem, webRequest, basePath)); |
40 } | 40 } |
41 | 41 |
42 protected Platform(final long ptr) | 42 protected Platform(final long ptr) |
43 { | 43 { |
44 this.ptr = ptr; | 44 this.ptr = ptr; |
45 this.disposer = new Disposer(this, new DisposeWrapper(ptr)); | 45 this.disposer = new Disposer(this, new DisposeWrapper(ptr)); |
46 } | 46 } |
47 | 47 |
48 public void setUpJsEngine(final AppInfo appInfo, final Long v8IsolatePtr) | 48 public void setUpJsEngine(final AppInfo appInfo, final long v8IsolatePtr) |
sergei
2017/09/26 09:44:13
Why not to use primitive value here and in Adblock
anton
2017/09/26 10:55:06
There is almost no difference.
I will use primitiv
| |
49 { | 49 { |
50 setUpJsEngine(this.ptr, appInfo, (v8IsolatePtr != null ? v8IsolatePtr.longVa lue() : 0L)); | 50 setUpJsEngine(this.ptr, appInfo, v8IsolatePtr); |
51 } | 51 } |
52 | 52 |
53 public void setUpJsEngine(final AppInfo appInfo) | 53 public void setUpJsEngine(final AppInfo appInfo) |
54 { | 54 { |
55 setUpJsEngine(appInfo, null); | 55 setUpJsEngine(appInfo, 0L); |
56 } | 56 } |
57 | 57 |
58 public JsEngine getJsEngine() | 58 public JsEngine getJsEngine() |
59 { | 59 { |
60 return new JsEngine(getJsEnginePtr(this.ptr)); | 60 return new JsEngine(getJsEnginePtr(this.ptr)); |
61 } | 61 } |
62 | 62 |
63 public void setUpFilterEngine(final IsAllowedConnectionCallback isSubscription DownloadAllowedCallback) | 63 public void setUpFilterEngine(final IsAllowedConnectionCallback isSubscription DownloadAllowedCallback) |
64 { | 64 { |
65 setUpFilterEngine(this.ptr, isSubscriptionDownloadAllowedCallback); | 65 setUpFilterEngine(this.ptr, isSubscriptionDownloadAllowedCallback); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
104 private final static native void setUpJsEngine(long ptr, AppInfo appInfo, long v8IsolatePtr); | 104 private final static native void setUpJsEngine(long ptr, AppInfo appInfo, long v8IsolatePtr); |
105 | 105 |
106 private final static native long getJsEnginePtr(long ptr); | 106 private final static native long getJsEnginePtr(long ptr); |
107 | 107 |
108 private final static native void setUpFilterEngine(long ptr, IsAllowedConnecti onCallback isSubscriptionDownloadAllowedCallback); | 108 private final static native void setUpFilterEngine(long ptr, IsAllowedConnecti onCallback isSubscriptionDownloadAllowedCallback); |
109 | 109 |
110 private final static native void ensureFilterEngine(long ptr); | 110 private final static native void ensureFilterEngine(long ptr); |
111 | 111 |
112 private final static native void dtor(long ptr); | 112 private final static native void dtor(long ptr); |
113 } | 113 } |
LEFT | RIGHT |