You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by GitBox <gi...@apache.org> on 2018/10/01 08:27:35 UTC

[GitHub] YorkShen closed pull request #1606: [WEEX-638][Android] fix attacheCurrentThread crash

YorkShen closed pull request #1606: [WEEX-638][Android] fix attacheCurrentThread crash
URL: https://github.com/apache/incubator-weex/pull/1606
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/weex_core/Source/android/base/jni/android_jni.cpp b/weex_core/Source/android/base/jni/android_jni.cpp
index 7385e7eb90..1402e96b9b 100644
--- a/weex_core/Source/android/base/jni/android_jni.cpp
+++ b/weex_core/Source/android/base/jni/android_jni.cpp
@@ -32,7 +32,13 @@ void InitVM(JavaVM *vm) {
 
 JNIEnv *AttachCurrentThread() {
   JNIEnv *env = nullptr;
-  jint ret = g_jvm->AttachCurrentThread(&env, nullptr);
+
+  JavaVMAttachArgs args;
+  args.version = JNI_VERSION_1_4;
+  args.name = "weex_sdk_runtime";
+  args.group = nullptr;
+
+  jint ret = g_jvm->AttachCurrentThread(&env, &args);
   return env;
 }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services