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

Unified Diff: libadblockplus-android/src/org/adblockplus/libadblockplus/android/AdblockEngine.java

Issue 29556582: Issue 5643 - Make v8::Isolate injectable into JsEngine (Closed)
Patch Set: Using JniLongToTypePtr for casting Created Sept. 28, 2017, 8:55 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « libadblockplus-android/src/org/adblockplus/libadblockplus/Platform.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libadblockplus-android/src/org/adblockplus/libadblockplus/android/AdblockEngine.java
diff --git a/libadblockplus-android/src/org/adblockplus/libadblockplus/android/AdblockEngine.java b/libadblockplus-android/src/org/adblockplus/libadblockplus/android/AdblockEngine.java
index f7d2ec6e40ff4e783aeda8515d9c0337fc1953a6..a600b9d1d4028233ecb0165a2f36d9c08df6aa8b 100644
--- a/libadblockplus-android/src/org/adblockplus/libadblockplus/android/AdblockEngine.java
+++ b/libadblockplus-android/src/org/adblockplus/libadblockplus/android/AdblockEngine.java
@@ -133,6 +133,7 @@ public final class AdblockEngine
private AppInfo appInfo;
private String basePath;
private IsAllowedConnectionCallback isAllowedConnectionCallback;
+ private Long v8IsolatePtr;
sergei 2017/09/28 09:34:49 I'm not sure about Long vs long here, but it seems
private AdblockEngine engine;
@@ -169,6 +170,12 @@ public final class AdblockEngine
return this;
}
+ public Builder useV8Isolate(long v8IsolatePtr)
+ {
+ this.v8IsolatePtr = v8IsolatePtr;
+ return this;
+ }
+
public Builder setUpdateAvailableCallback(UpdateAvailableCallback callback)
{
engine.updateAvailableCallback = callback;
@@ -255,7 +262,14 @@ public final class AdblockEngine
{
engine.logSystem = new AndroidLogSystem();
engine.platform = new Platform(engine.logSystem, engine.webRequest, basePath);
- engine.platform.setUpJsEngine(appInfo);
+ if (v8IsolatePtr != null)
+ {
+ engine.platform.setUpJsEngine(appInfo, v8IsolatePtr);
+ }
+ else
+ {
+ engine.platform.setUpJsEngine(appInfo);
+ }
engine.platform.setUpFilterEngine(isAllowedConnectionCallback);
engine.filterEngine = engine.platform.getFilterEngine();
}
« no previous file with comments | « libadblockplus-android/src/org/adblockplus/libadblockplus/Platform.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld