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: Even more review issues fixed. Created April 28, 2014, 10:18 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
« no previous file with comments | « jni/JniCallbacks.cpp ('k') | jni/JniJsValue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « jni/JniCallbacks.cpp ('k') | jni/JniJsValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld