diff options
author | torne@chromium.org <torne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-07 19:51:37 +0000 |
---|---|---|
committer | torne@chromium.org <torne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-07 19:51:37 +0000 |
commit | 691b2001018e28625ceeb0d4710472ff66ef9857 (patch) | |
tree | a935fa132a133387ab47ae60985b1f8ba80cac88 /base/android/jni_android.cc | |
parent | d0621ff613528943b89defa6530a06934a82a2e7 (diff) | |
download | chromium_src-691b2001018e28625ceeb0d4710472ff66ef9857.zip chromium_src-691b2001018e28625ceeb0d4710472ff66ef9857.tar.gz chromium_src-691b2001018e28625ceeb0d4710472ff66ef9857.tar.bz2 |
Revert "android: Add CHECK() calls to better understand memory corruption."
This reverts r237591. The added CHECK() breaks the Android WebView and
was added to help diagnose a now-fixed bug that turned out to be
unrelated.
BUG=332079
NOTRY=true
Review URL: https://codereview.chromium.org/106433010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243367 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/android/jni_android.cc')
-rw-r--r-- | base/android/jni_android.cc | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/base/android/jni_android.cc b/base/android/jni_android.cc index 0ec6f9a..59f25e2 100644 --- a/base/android/jni_android.cc +++ b/base/android/jni_android.cc @@ -17,10 +17,6 @@ using base::android::MethodID; using base::android::ScopedJavaLocalRef; JavaVM* g_jvm = NULL; - -// NOTE: This variable is only used for debugging http://crbug.com/322200 -const JNIInvokeInterface* g_jvm_functions = NULL; - // Leak the global app context, as it is used from a non-joinable worker thread // that may still be running at shutdown. There is no harm in doing this. base::LazyInstance<base::android::ScopedJavaGlobalRef<jobject> >::Leaky @@ -80,10 +76,7 @@ namespace android { JNIEnv* AttachCurrentThread() { DCHECK(g_jvm); JNIEnv* env = NULL; - // See http://crbug.com/322200 for the reasons for these CHECKs. - CHECK(g_jvm); - CHECK_EQ(g_jvm_functions, g_jvm->functions); - jint ret = g_jvm_functions->AttachCurrentThread(g_jvm, &env, NULL); + jint ret = g_jvm->AttachCurrentThread(&env, NULL); DCHECK_EQ(JNI_OK, ret); return env; } @@ -91,18 +84,13 @@ JNIEnv* AttachCurrentThread() { void DetachFromVM() { // Ignore the return value, if the thread is not attached, DetachCurrentThread // will fail. But it is ok as the native thread may never be attached. - if (g_jvm) { - // See http://crbug.com/322200 for the reasons for these CHECKs. - CHECK(g_jvm); - CHECK_EQ(g_jvm_functions, g_jvm->functions); + if (g_jvm) g_jvm->DetachCurrentThread(); - } } void InitVM(JavaVM* vm) { DCHECK(!g_jvm); g_jvm = vm; - g_jvm_functions = vm->functions; } bool IsVMInitialized() { |