Index: jni/JniFilterChangeCallback.cpp |
diff --git a/jni/JniFilterChangeCallback.cpp b/jni/JniFilterChangeCallback.cpp |
index c1e1996ab43eefd990d4d755f3b6e2656ca7ab59..2f67b43d38e01dde4ddd4409269a0fa7df273599 100644 |
--- a/jni/JniFilterChangeCallback.cpp |
+++ b/jni/JniFilterChangeCallback.cpp |
@@ -32,7 +32,7 @@ static void JNICALL JniDtor(JNIEnv* env, jclass clazz, jlong ptr) |
} |
JniFilterChangeCallback::JniFilterChangeCallback(JNIEnv* env, jobject callbackObject) |
- : JniCallbackBase(env, callbackObject) |
+ : JniCallbackBase(env, callbackObject), jsValueClass(new JniGlobalReference<jclass>(env, env->FindClass(PKG("JsValue")))) |
{ |
} |
@@ -46,7 +46,7 @@ void JniFilterChangeCallback::Callback(const std::string& arg, const AdblockPlus |
if (method) |
{ |
jstring jArg = env->NewStringUTF(arg.c_str()); |
- jobject jJsValue = NewJniJsValue(*env, jsValue); |
+ jobject jJsValue = NewJniJsValue(*env, jsValue, jsValueClass->Get()); |
env->CallVoidMethod(GetCallbackObject(), method, jArg, jJsValue); |
} |