diff options
author | 2019-10-07 13:51:13 +0000 | |
---|---|---|
committer | 2019-10-07 18:59:55 +0000 | |
commit | 55eccdf61f46bd2a633f489f8d09cf78e1de1938 (patch) | |
tree | e60d91c8fc48dfe70956ec9febd346b9dc9fcf77 /runtime/common_dex_operations.h | |
parent | 49df715faf3700e874fbe246b339a8e426549216 (diff) |
Revert^4 "Walk internal ArtField/ArtMethod pointers"
Several of the new tests make use of the invoke-custom opcode. This
opcode is not supported by dexter/slicer causing the tests to fail.
This reverts commit c34eab45161c51bf63e548e44645cbcc59d01268.
Reason for revert: Added tests to redefine-stress known failures
Test: ./test.py --host --redefine-stress
Bug: 134162467
Change-Id: Ic1b375a0cb1e44d0252c17115af92c269fb8efc5
Diffstat (limited to 'runtime/common_dex_operations.h')
-rw-r--r-- | runtime/common_dex_operations.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/common_dex_operations.h b/runtime/common_dex_operations.h index 2f86fbcca6..882e3ce4c7 100644 --- a/runtime/common_dex_operations.h +++ b/runtime/common_dex_operations.h @@ -35,6 +35,8 @@ #include "mirror/class.h" #include "mirror/object.h" #include "obj_ptr-inl.h" +#include "reflective_handle.h" +#include "reflective_handle_scope.h" #include "runtime.h" #include "stack.h" #include "thread.h" @@ -100,8 +102,10 @@ static ALWAYS_INLINE bool DoFieldGetCommon(Thread* self, instrumentation::Instrumentation* instrumentation = Runtime::Current()->GetInstrumentation(); if (UNLIKELY(instrumentation->HasFieldReadListeners())) { StackHandleScope<1> hs(self); + StackArtFieldHandleScope<1> rhs(self); // Wrap in handle wrapper in case the listener does thread suspension. HandleWrapperObjPtr<mirror::Object> h(hs.NewHandleWrapper(&obj)); + ReflectiveHandleWrapper<ArtField> fh(rhs.NewReflectiveHandleWrapper(&field)); ObjPtr<mirror::Object> this_object; if (!field->IsStatic()) { this_object = obj; @@ -159,8 +163,10 @@ ALWAYS_INLINE bool DoFieldPutCommon(Thread* self, instrumentation::Instrumentation* instrumentation = Runtime::Current()->GetInstrumentation(); if (UNLIKELY(instrumentation->HasFieldWriteListeners())) { StackHandleScope<2> hs(self); + StackArtFieldHandleScope<1> rhs(self); // Save this and return value (if needed) in case the instrumentation causes a suspend. HandleWrapperObjPtr<mirror::Object> h(hs.NewHandleWrapper(&obj)); + ReflectiveHandleWrapper<ArtField> fh(rhs.NewReflectiveHandleWrapper(&field)); ObjPtr<mirror::Object> this_object = field->IsStatic() ? nullptr : obj; mirror::Object* fake_root = nullptr; HandleWrapper<mirror::Object> ret(hs.NewHandleWrapper<mirror::Object>( @@ -210,8 +216,10 @@ ALWAYS_INLINE bool DoFieldPutCommon(Thread* self, ObjPtr<mirror::Class> field_class; { StackHandleScope<2> hs(self); + StackArtFieldHandleScope<1> rhs(self); HandleWrapperObjPtr<mirror::Object> h_reg(hs.NewHandleWrapper(®)); HandleWrapperObjPtr<mirror::Object> h_obj(hs.NewHandleWrapper(&obj)); + ReflectiveHandleWrapper<ArtField> fh(rhs.NewReflectiveHandleWrapper(&field)); field_class = field->ResolveType(); } // ArtField::ResolveType() may fail as evidenced with a dexing bug (b/78788577). |