Index: jni/JniFilterChangeCallback.cpp |
diff --git a/jni/JniFilterChangeCallback.cpp b/jni/JniFilterChangeCallback.cpp |
index c1e1996ab43eefd990d4d755f3b6e2656ca7ab59..717878a287dbccb9e7b7b8c8bc1e856ca8dc75b6 100644 |
--- a/jni/JniFilterChangeCallback.cpp |
+++ b/jni/JniFilterChangeCallback.cpp |
@@ -34,6 +34,7 @@ static void JNICALL JniDtor(JNIEnv* env, jclass clazz, jlong ptr) |
JniFilterChangeCallback::JniFilterChangeCallback(JNIEnv* env, jobject callbackObject) |
: JniCallbackBase(env, callbackObject) |
{ |
+ jsValueClass.reset(new JniGlobalReference<jclass>(env, env->FindClass(PKG("JsValue")))); |
Felix Dahlke
2014/04/16 15:24:25
Should be initialised in the initialisation list.
René Jeschke
2014/04/16 17:51:47
Done.
|
} |
void JniFilterChangeCallback::Callback(const std::string& arg, const AdblockPlus::JsValuePtr jsValue) |
@@ -46,7 +47,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); |
} |