Previously we didn't check for null which could result in check jni
failures if we tried to throw another OOM in the next allocation.
Bug:
18297817
Change-Id: I459b1de7760a4009e410fdbdcacdb748d13fbc1d
thread_group = runtime->GetMainThreadGroup();
}
ScopedLocalRef<jobject> thread_name(env, env->NewStringUTF(name));
+ if (thread_name.get() == nullptr) {
+ CHECK(IsExceptionPending());
+ return;
+ }
jint thread_priority = GetNativePriority();
jboolean thread_is_daemon = as_daemon;