From 987560fee798e48fb725c44b796d8ca7a5872ad6 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Tue, 22 Apr 2014 11:42:59 -0700 Subject: Remove support for app JNI workarounds. Change-Id: I4396df7e93fcace4b5b19c2c387e5c30089182a6 --- runtime/indirect_reference_table.cc | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'runtime/indirect_reference_table.cc') diff --git a/runtime/indirect_reference_table.cc b/runtime/indirect_reference_table.cc index bbad884..987df91 100644 --- a/runtime/indirect_reference_table.cc +++ b/runtime/indirect_reference_table.cc @@ -254,20 +254,11 @@ bool IndirectReferenceTable::Remove(uint32_t cookie, IndirectRef iref) { int idx = ExtractIndex(iref); - JavaVMExt* vm = Runtime::Current()->GetJavaVM(); if (GetIndirectRefKind(iref) == kSirtOrInvalid && Thread::Current()->SirtContains(reinterpret_cast(iref))) { LOG(WARNING) << "Attempt to remove local SIRT entry from IRT, ignoring"; return true; } - if (GetIndirectRefKind(iref) == kSirtOrInvalid && vm->work_around_app_jni_bugs) { - mirror::Object* direct_pointer = reinterpret_cast(iref); - idx = Find(direct_pointer, bottomIndex, topIndex, table_); - if (idx == -1) { - LOG(WARNING) << "Trying to work around app JNI bugs, but didn't find " << iref << " in table!"; - return false; - } - } if (idx < bottomIndex) { // Wrong segment. @@ -285,7 +276,7 @@ bool IndirectReferenceTable::Remove(uint32_t cookie, IndirectRef iref) { if (idx == topIndex-1) { // Top-most entry. Scan up and consume holes. - if (!vm->work_around_app_jni_bugs && !CheckEntry("remove", iref, idx)) { + if (!CheckEntry("remove", iref, idx)) { return false; } @@ -321,7 +312,7 @@ bool IndirectReferenceTable::Remove(uint32_t cookie, IndirectRef iref) { LOG(INFO) << "--- WEIRD: removing null entry " << idx; return false; } - if (!vm->work_around_app_jni_bugs && !CheckEntry("remove", iref, idx)) { + if (!CheckEntry("remove", iref, idx)) { return false; } -- cgit v1.1