Fix an ART warning about deletion of a non-local JNI reference (flutter/engine#3100)

This commit is contained in:
Jason Simmons
2016-10-06 09:43:30 -07:00
committed by GitHub
parent 649b958d19
commit 9e6bbacf00

View File

@@ -62,7 +62,8 @@ static void Init(JNIEnv* env,
jobject context,
jobjectArray jargs) {
base::PlatformThread::SetName("java_ui_thread");
base::android::ScopedJavaLocalRef<jobject> scoped_context(env, context);
base::android::ScopedJavaLocalRef<jobject> scoped_context(
env, env->NewLocalRef(context));
base::android::InitApplicationContext(env, scoped_context);
std::vector<std::string> args;