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: Removed member variable prefixes Created Jan. 23, 2015, 1:16 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
« no previous file with comments | « jni/JniCallbacks.cpp ('k') | jni/JniFilter.cpp » ('j') | jni/JniLogSystem.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
Felix Dahlke 2015/02/03 05:22:50 I think I've seen at least three instances of pret
René Jeschke 2015/02/03 13:51:26 Yeah, the first implementation supported this, but
Felix Dahlke 2015/02/04 04:11:50 Good point, yeah.
+ env->GetObjectClass(GetCallbackObject())),
+ "eventCallback", "(Ljava/util/List;)V");
if (method)
{
« no previous file with comments | « jni/JniCallbacks.cpp ('k') | jni/JniFilter.cpp » ('j') | jni/JniLogSystem.cpp » ('J')

Powered by Google App Engine
This is Rietveld