diff options
Diffstat (limited to 'runtime/native/java_lang_Thread.cc')
-rw-r--r-- | runtime/native/java_lang_Thread.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/native/java_lang_Thread.cc b/runtime/native/java_lang_Thread.cc index 8b76327fa8..4ce72edd7b 100644 --- a/runtime/native/java_lang_Thread.cc +++ b/runtime/native/java_lang_Thread.cc @@ -155,7 +155,8 @@ static void Thread_nativeSetName(JNIEnv* env, jobject peer, jstring java_name) { ScopedObjectAccess soa(env); thread->SetThreadName(name.c_str()); } - thread_list->Resume(thread, SuspendReason::kInternal); + bool resumed = thread_list->Resume(thread, SuspendReason::kInternal); + DCHECK(resumed); } else if (timed_out) { LOG(ERROR) << "Trying to set thread name to '" << name.c_str() << "' failed as the thread " "failed to suspend within a generous timeout."; |