diff options
author | Ian Rogers <irogers@google.com> | 2014-04-22 11:42:59 -0700 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2014-04-22 14:52:19 -0700 |
commit | 987560fee798e48fb725c44b796d8ca7a5872ad6 (patch) | |
tree | d61f35a129847f3f5fbed1436649e75acd940b3f /runtime/indirect_reference_table.cc | |
parent | 44b0053fdb7ad8a30138d29f714172a7dc69efb8 (diff) | |
download | art-987560fee798e48fb725c44b796d8ca7a5872ad6.zip art-987560fee798e48fb725c44b796d8ca7a5872ad6.tar.gz art-987560fee798e48fb725c44b796d8ca7a5872ad6.tar.bz2 |
Remove support for app JNI workarounds.
Change-Id: I4396df7e93fcace4b5b19c2c387e5c30089182a6
Diffstat (limited to 'runtime/indirect_reference_table.cc')
-rw-r--r-- | runtime/indirect_reference_table.cc | 13 |
1 files changed, 2 insertions, 11 deletions
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<jobject>(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<mirror::Object*>(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; } |