OSDN Git Service

Binder: Update to new ScopedLocalRef
authorAndreas Gampe <agampe@google.com>
Thu, 21 Sep 2017 17:55:59 +0000 (10:55 -0700)
committerAndreas Gampe <agampe@google.com>
Wed, 25 Oct 2017 00:13:52 +0000 (17:13 -0700)
Follow-up to commit 625e0007ac07c5aefb4b3d486575ab916116c129 and
commit fac8cb2405999d18aefd75387a5bbdb0c6160e7f.

(cherry picked from commit 8571ec370da1b629aa8eb7267f139f1610627857)

Bug: 64689630
Test: m
Merged-In: I119cf83a5a54c15973ed3701ee448a9590bb404d
Change-Id: I119cf83a5a54c15973ed3701ee448a9590bb404d

core/jni/android_util_Binder.cpp

index ee5d4ac..7908c9d 100644 (file)
@@ -238,7 +238,7 @@ static void report_exception(JNIEnv* env, jthrowable excep, const char* msg)
     env->ExceptionClear();
 
     ScopedLocalRef<jstring> tagstr(env, env->NewStringUTF(LOG_TAG));
-    ScopedLocalRef<jstring> msgstr;
+    ScopedLocalRef<jstring> msgstr(env);
     if (tagstr != nullptr) {
         msgstr.reset(env->NewStringUTF(msg));
     }