diff options
author | 2019-09-12 11:16:28 -0700 | |
---|---|---|
committer | 2019-09-13 15:58:42 +0000 | |
commit | 40fb15bcc5803e5bce621b4c96da6bb54b48dba6 (patch) | |
tree | 076656566944de1f4996933653379e92000e7d57 | |
parent | 60931d9f0a6b63fec1bf44fa662032e930438f42 (diff) |
Fix MethodHandle::GetTargetClass bug
MethodHandle::GetTargetClass incorrectly asserted that ArtMethod types
were kind <= kLastValidKind instead of kind < kFirstAccessorKind. This
fixes that issue.
Test: ./test.py --host
Change-Id: I828a054ec89223b07a05bcb898d03d34608ad1e6
-rw-r--r-- | runtime/mirror/method_handle_impl-inl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/mirror/method_handle_impl-inl.h b/runtime/mirror/method_handle_impl-inl.h index 12047d4efa..932b4343f3 100644 --- a/runtime/mirror/method_handle_impl-inl.h +++ b/runtime/mirror/method_handle_impl-inl.h @@ -35,7 +35,7 @@ inline ObjPtr<mirror::MethodType> MethodHandle::GetNominalType() { inline ObjPtr<mirror::Class> MethodHandle::GetTargetClass() { Kind kind = GetHandleKind(); - return (kind <= kLastValidKind) ? + return (kind < kFirstAccessorKind) ? GetTargetMethod()->GetDeclaringClass() : GetTargetField()->GetDeclaringClass(); } |