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

Unified Diff: jni/JniEventCallback.cpp

Issue 4761138508070912: Issue 1848 - Clean up local reference handling (Closed)
Patch Set: Formatting, explicit, unrelated change Created Feb. 3, 2015, 1:51 p.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/JniEventCallback.cpp
diff --git a/jni/JniEventCallback.cpp b/jni/JniEventCallback.cpp
index c92a48845b979d9ae45a52bfaa33e0e9494625de..e2035d9d83f9f0a1e5d6eaad8187763621c31cde 100644
--- a/jni/JniEventCallback.cpp
+++ b/jni/JniEventCallback.cpp
@@ -40,8 +40,10 @@ void JniEventCallback::Callback(AdblockPlus::JsValueList& params)
{
JNIEnvAcquire env(GetJavaVM());
- jclass clazz = env->GetObjectClass(GetCallbackObject());
- jmethodID method = env->GetMethodID(clazz, "eventCallback", "(Ljava/util/List;)V");
+ jmethodID method = env->GetMethodID(
+ *JniLocalReference<jclass>(*env,
+ env->GetObjectClass(GetCallbackObject())),
+ "eventCallback", "(Ljava/util/List;)V");
if (method)
{
« no previous file with comments | « jni/JniCallbacks.cpp ('k') | jni/JniFilter.cpp » ('j') | jni/JniUpdateCheckDoneCallback.cpp » ('J')

Powered by Google App Engine
This is Rietveld