Commit 3546854f authored by agrieve's avatar agrieve Committed by Commit Bot

Android: Add a CHECK that AttachCurrentThread() succeeds

Bug: 908997
Change-Id: Iac24d68050cbf7331da37c45a5fe617b94c0d81f
Reviewed-on: https://chromium-review.googlesource.com/c/1355908Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Commit-Queue: agrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612694}
parent 3cdc1679
...@@ -58,7 +58,7 @@ JNIEnv* AttachCurrentThread() { ...@@ -58,7 +58,7 @@ JNIEnv* AttachCurrentThread() {
} }
ret = g_jvm->AttachCurrentThread(&env, &args); ret = g_jvm->AttachCurrentThread(&env, &args);
DCHECK_EQ(JNI_OK, ret); CHECK_EQ(JNI_OK, ret);
} }
return env; return env;
} }
...@@ -71,7 +71,7 @@ JNIEnv* AttachCurrentThreadWithName(const std::string& thread_name) { ...@@ -71,7 +71,7 @@ JNIEnv* AttachCurrentThreadWithName(const std::string& thread_name) {
args.group = NULL; args.group = NULL;
JNIEnv* env = NULL; JNIEnv* env = NULL;
jint ret = g_jvm->AttachCurrentThread(&env, &args); jint ret = g_jvm->AttachCurrentThread(&env, &args);
DCHECK_EQ(JNI_OK, ret); CHECK_EQ(JNI_OK, ret);
return env; return env;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment