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

Unified Diff: jni/JniCallbacks.cpp

Issue 4761138508070912: Issue 1848 - Clean up local reference handling (Closed)
Patch Set: Some formatting issues Created Jan. 23, 2015, 12:30 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 | « no previous file | jni/JniEventCallback.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jni/JniCallbacks.cpp
diff --git a/jni/JniCallbacks.cpp b/jni/JniCallbacks.cpp
index 407a0b0723f344f28442ad49048b473e7a5a3e96..1bc47e140a62d6f3c6300200b82c1faee2d4029e 100644
--- a/jni/JniCallbacks.cpp
+++ b/jni/JniCallbacks.cpp
@@ -42,8 +42,8 @@ void JniCallbackBase::CheckAndLogJavaException(JNIEnv* env) const
{
if (env->ExceptionCheck())
{
- jthrowable throwable = env->ExceptionOccurred();
+ JniLocalReference<jthrowable> throwable(env, env->ExceptionOccurred());
env->ExceptionClear();
- LogException(env, throwable);
+ LogException(env, *throwable);
}
}
« no previous file with comments | « no previous file | jni/JniEventCallback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld