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

Unified Diff: libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.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
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)
{

Powered by Google App Engine
This is Rietveld