Skip to content
Permalink
Browse files
2011-02-28 Steve Block <steveblock@google.com>
        Reviewed by Jeremy Orlow.

        getJNIEnv() passes wrong type to AttachCurrentThread() for JNIEnv argument on Android
        https://bugs.webkit.org/show_bug.cgi?id=55218

        AttachCurrentThread() in Android's JVM takes a JINEnv**
        argument.

        No new tests, build fix only.

        * bridge/jni/JNIUtility.cpp:
        (JSC::Bindings::getJNIEnv):

Canonical link: https://commits.webkit.org/69769@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@79852 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Steve Block committed Feb 28, 2011
1 parent ed4a411 commit 651011091e1f8f0266bfc1c7ff52cb2314b9da6d
Showing 2 changed files with 19 additions and 0 deletions.
@@ -1,3 +1,18 @@
2011-02-28 Steve Block <steveblock@google.com>

Reviewed by Jeremy Orlow.

getJNIEnv() passes wrong type to AttachCurrentThread() for JNIEnv argument on Android
https://bugs.webkit.org/show_bug.cgi?id=55218

AttachCurrentThread() in Android's JVM takes a JINEnv**
argument.

No new tests, build fix only.

* bridge/jni/JNIUtility.cpp:
(JSC::Bindings::getJNIEnv):

2011-02-28 Renata Hodovan <reni@webkit.org>

Reviewed by Andreas Kling.
@@ -90,7 +90,11 @@ JNIEnv* getJNIEnv()
} u;
jint jniError = 0;

#if OS(ANDROID)
jniError = getJavaVM()->AttachCurrentThread(&u.env, 0);
#else
jniError = getJavaVM()->AttachCurrentThread(&u.dummy, 0);
#endif
if (jniError == JNI_OK)
return u.env;
LOG_ERROR("AttachCurrentThread failed, returned %ld", static_cast<long>(jniError));

0 comments on commit 6510110

Please sign in to comment.