Index: libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java |
diff --git a/libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java b/libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java |
index 41592ace84661ace8e97c007e5a9caec66dc8e37..414a45fa1cdb4af80b6bf3e2ebbd10b871b65fda 100644 |
--- a/libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java |
+++ b/libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java |
@@ -59,6 +59,7 @@ public class AdblockHelper |
private AdblockEngine engine; |
private AdblockSettingsStorage storage; |
private CountDownLatch engineCreated; |
+ private Long v8IsolatePtr; |
/* |
Simple ARC management for AdblockEngine |
@@ -131,6 +132,11 @@ public class AdblockHelper |
return this; |
} |
+ public void useV8Isolate(long ptr) |
+ { |
+ this.v8IsolatePtr = ptr; |
+ } |
+ |
private void createAdblock() |
{ |
ConnectivityManager connectivityManager = |
@@ -152,6 +158,11 @@ public class AdblockHelper |
.setIsAllowedConnectionCallback(isAllowedConnectionCallback) |
.enableElementHiding(true); |
+ if (v8IsolatePtr != null) |
+ { |
+ builder.useV8Isolate(v8IsolatePtr); |
+ } |
+ |
// if preloaded subscriptions provided |
if (preloadedPreferenceName != null) |
{ |