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

Unified Diff: jni/JniFilterChangeCallback.cpp

Issue 5697499218051072: Usage of new API, cleanups (reduced) (Closed)
Patch Set: Removed even more unrelated changes Created April 28, 2014, 9:42 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: 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);
}

Powered by Google App Engine
This is Rietveld